Data Structures and Algorithms Assig 1 Fall21
Data Structures and Algorithms Assig 1 Fall21
Data Structures and Algorithms Assig 1 Fall21
ASSIGNEMNT BRIEF
HTU Course No: 30202200 HTU Course Name: Data Structures & Algorithms
BTEC UNIT No: D/615/1649 BTEC UNIT Name: Data Structures & Algorithms
Version: 1
1
Page 2 of 10
Assignment Brief
Student Name /
ID Number
HTU Course Number and Title 30202200 Data Structures & Algorithms
BTEC Unit Number and Title D/615/1649 Data Structures & Algorithms
Academic Year Fall 2021/2022
Assignment Author Eng. Malek Al-Louzi
Course Tutor Eng. Malek Al-Louzi
Assignment Title Event Management System
Assignment Ref No Assignment 1
Issue Date 16/12/2021
Formative Assessment dates 26/12/2021 – 13/1/2022
Submission Date 27th January 2022
IV Name & Date Dr. Hossam Faris 15/12/2021
Submission Format
Assignment Guidelines
• You are required to submit a well formatted PDF report that provides a complete answer for
all required tasks.
• Full and clear answers for all required tasks, mention the task number and the subtask
number before each answer.
• You should sign the student declaration form attached to this assignment brief (use
electronic signature to sign it).
• You must submit a compressed file (ZIP file) that includes all Source codes for the
tasks that require code implementation, each source code should be named by the task
number and the extension should be .java (TaskN.java). The source file should be fully
commented.
Page 3 of 10
• Soft-copy submissions are only allowed, you are required to upload your submission
files to the university’s eLearning platform through (https://elearning.htu.edu.jo/) within
the submission date and time stated above. NO SUBMISSION by EMAIL and NO
LATE SUBMISSIONS WILL BE ACCEPTED.
• If you commit any kind of plagiarism, HTU policies and regulations will be applied.
• The Discussion will be an online one to one oral discussion between you and your
instructor through Microsoft Teams, which includes debugging, analyzing, and
evaluating the code and algorithm developed in this code.
• The attendance of the oral discussion is mandatory in the date and time determined by
your instructor, the exact discussion schedule will be announced after your submission,
and you need to be ready to open your camera from the beginning of the discussion.
• You must sign the witness form that your instructor will fill up after the discussion to
complete the discussion process.
Page 4 of 10
LO1. Examine abstract data types, concrete data structures and algorithms.
LO2. Specify abstract data types and algorithms in a formal notation.
LO3. Implement complex data structures and algorithms.
LO4. Assess the effectiveness of data structures and algorithms.
Task1
The event place has one main entrance for cars, and it is expected that cars will arrive at the same
time, you should think how to order and organize the expected coming cars from the street that
want to attend the event. The number of attending cars is unknown, so you need to handle this
unknown number of cars too.
Your direct manager in the company suggests organizing the coming cars as the first coming car
will enter to the event first, suppose each car is an integer number, and your direct manager
wants you to use Linked List data structure and wants you to remove the car from the end of the
Linked List.
a. Create a design specification for this data structure showing how to use it for implementing
your solution, also you need to explain the valid operations with this data structure.
(Report)
b. Illustrate how your design will work by showing several cars are coming and leaving based
on a scenario you suggest. (Report)
Task2
In this system, there is an option for the finance department to do some calculations related to the
event, they will input their equations through expressions as the following expression example:
These expressions are in the form of String data type, in this task you will be responsible to
check whether the parentheses in the expression are balanced or not.
The Expression is of the form of a string comprising of constants, variables, operators, and
parentheses, parenthesis include curly brackets, square brackets, and parentheses, as following
Page 5 of 10
You should think of a way to check if parentheses in an expression are balanced or not. Balanced
parentheses are that corresponding to each opening parenthesis we should have a closing
counterpart in correct order.
The following are examples of some expressions:
What’s inside parentheses does not matter you should not check for correctness of anything that
is inside a parenthesis, so in the expression any character other than opening and closing
parenthesis can be ignored.
To solve this problem easily, you need to choose a data structure that you know to use it in your
solution.
a. you should demonstrate how you will solve this problem by writing a Pseudocode for a
function that takes a string expression and returns whether this expression balanced or
not. (Report)
b. You need to specify the ADT of the data structure you used in Task2 a. (Report)
c. Interpret what is a trade-off when specifying this data structure if it exists. (Report)
Task3
A junior colleague of you in your department read that the stack data structure is used to handle
function calls, he asked you to explain how stack is used with function calls. You need to draw a
stack and use it with a scenario that you suggest supporting your answer. (Report)
Task4
This task is for registration department of the event, they need to do the following:
• Register people’s names and ages who are interested to attend the event.
Page 6 of 10
a. To find the shortest path, you need to apply Dijkstra’s and Bellman-Ford Algorithms to
find the solution using each algorithm, show your steps clearly in each Algorithm.
(Report)
b. Implement the Bellman-Ford algorithm as a method called Bellman in Java, this
method will take Two arguments the Graph and the Source Vertex to start from,
suppose the graph is stored in Adjacency Matrix. Your method should print the shortest
path from the Source Vertex to the destination Vertex only in the graph. (Code)
Task7
After finishing successfully all the previous tasks, your direct manager wants to take your
feedback on the following points to make sure of your understanding to get a promotion in the
company:
a. In reference to the Object-Oriented Programming, what is Encapsulation and what are
the advantages of it when you implement a Data structure, you need to examine these
advantages. (Report)
b. You need to find three benefits of separating the implementation stage of a data
structure and define it as ADT, Evaluate these benefits. (Report)
c. When you define data structures as ADTs, there is an opinion said that this is the basis
of Object-Oriented programming, with justification state whether you agree or not.
(Report)
Page 8 of 10
LO1 Examine abstract data types, concrete data structures and algorithms
P1 Create a design specification for data M1 Illustrate, with an example, a D1 Analyse the operation,
structures explaining the valid operations concrete data structure for a First using illustrations, of two
that can be carried out on the In First out (FIFO) queue.
structures. network shortest path
algorithms, providing an
P2 Determine the operations of a memory M2 Compare the performance of
stack and how it is used to implement two sorting algorithms. example of each.
function calls in a computer.
P6 Discuss how asymptotic analysis M5 Interpret what a trade-off D4 Evaluate three benefits of
can be used to assess the effectiveness is when specifying an ADT using implementation
of an algorithm. using an example to support independent data structures.
your answer.
P7 Determine two ways in which the
efficiency of an algorithm can be
measured, illustrating your answer with
an example.
Page 10 of 10
Student ID:
/ / / / / /
Programme:
HTU Course Name: Data Structures & Algorithms BTEC UNIT Title: Data Structures
& Algorithms
Plagiarism
Plagiarism is a particular form of cheating. Plagiarism must be avoided at all costs and
students who break the rules, however innocently, may be penalised. It is your
responsibility to ensure that you understand correct referencing practices. As a
university level student, you are expected to use appropriate references throughout and
keep carefully detailed notes of all your sources of materials for material you have used
in your work, including any material downloaded from the Internet. Please consult the
relevant unit lecturer or your course tutor if you need any further advice.
Student declaration
I certify that the assignment submission is entirely my own work and I fully understand
the consequences of plagiarism. I understand that making a false declaration is a form
of malpractice.