1 - Data Structures and Algorithms Assignment After IV
1 - Data Structures and Algorithms Assignment After IV
Authenticity: Your proposed work should be authentic, and not copied from others. your answers have to
relate to the vocational scenario and not generally. If you use ideas, quotes or data (such as diagrams) from
books, journals or other sources, you must reference your sources, using the Harvard style.
This assignment provides practice on designing and building data structures and utilize them
for building systems according to certain requirements.
Also, it teaches students to compare different algorithms and assess their effectiveness.
Along with the following:
- identify program data requirements.
- specify abstract data types using formal notation.
- translate into concrete data structures and be able to develop, using a programming
paradigm, different sorting, searching and navigational algorithms that implement
complex data structures and evaluate their effectiveness.
Vocational scenario:
You are working in a Tech Solutions company that designs and builds software
solutions for several clients.
Your company has won the bid to create an application that handle many required
services for MacDonalds. an application for handling different features for
MacDonalds services.
Consider the tasks below to implement the system.
The application has many features as listed and explained in the following tasks:
Task 1: Handling Orders
Description: cars in drive thru line place their order once it is their turn. The
orders are delivered in a first-come-first-serve order.
1.1: Draw a class diagram that includes the following classes and show the
relationship between them, information hiding, and ADT specifications:
Order: each order placed from drive thru service contains: order ID, list of
items, total price. This class have an operation to calculate the total price
based on items (not user input), and a print operation.
Item: each item has a description and a price. For example, (Big Mac, 5.00)
Queue: implement over a DLL to handle orders. With main add and remove
operations of a queue.
DLL: customize the DLL class to store orders, and another one to store items.
The DLLOrder class has two operations, AddOrder that add an order to
the end of the list, and a RemoveOrder that return the removed order
from the head/front.
The DLLItems has only one operation (AddItem) that add an Item to the
end of the list.
1.2: Implement the solution according to the given classes and specifications, and
prevent handling orders when there are no orders in queue and prevent creating
invoice/total price for empty list of items .
1.3: Test your implementation using a Demo class , Figure 1 shows a sample testing.
Present how the specified ADT solves the given problem.
Figure 1 : sample testing
1.4: Draw an illustration to show how queue handles the orders in FIFO manner, give
examples.
1.5: Consider implementing the Queue class over an array, and SLL. Discuss the
implementation details in term of space and time complexities as well as the possible
trade-offs regarding queue specifications (enqueue and dequeue).
1.6: In Mac they have a job to put plates in a cabinet. The way they put the plates is
one on top of another until the cabinet is full. When they want to use the plates they
take the plate that is on top in the cabinet until they are all finished. They have
brought a robot to do the job. Help them by defining a stack specification so they
can use it to implement the solution, show how stack handle the solution.
Recommended Resources
Please note that the resources listed are examples for you to use as a starting
point in your research – the list is not definitive.
Textbooks
Learning Outcomes and Assessment Criteria
Pass Merit Distinction
LO1 Examine abstract data types, concrete data
structures and algorithms
P1 Create a design M1 Illustrate, with an D1 Analyse the operation,
specification for data example, a concrete data using illustrations, of two
structures explaining the structure for a First In network shortest path
valid operations that can First out (FIFO) queue. algorithms, providing an
be carried out on the example of each.
structures.
M2 Compare the
P2 Determine the performance of two
operations of a memory sorting algorithms
stack and how it is used
to implement function
calls in a computer.
D2 Discuss the view that
LO2 Specify abstract data types and algorithms in a
imperative ADTs are a basis
formal notation
for object orientation and,
P3 Using an imperative M3 Examine the with justification, state
definition, specify the advantages of whether you agree.
abstract data type for a encapsulation and
software stack. information hiding when
using an ADT
Learning Outcomes and Assessment Criteria
Pass Merit Distinction
LO3 Implement complex data structures and
algorithms
P4 Implement a complex M4 Demonstrate how the D3 Critically evaluate the
ADT and algorithm in an implementation of an complexity of an
executable programming ADT/algorithm solves a implemented
language to solve a well- well-defined problem ADT/algorithm.
defined problem.
P5 Implement error
handling and report test
results
LO4 Assess the effectiveness of data structures and
algorithms
P6 Discuss how M5 Interpret what a
asymptotic analysis can trade-off is when
be used to assess the specifying an ADT using
effectiveness of an an example to support D4 Evaluate three
algorithm. your answer. benefits of using
implementation
independent data
P7 Determine two ways in structures.
which the efficiency of an
algorithm can be
measured, illustrating
your answer with an
example.