Advanced Pizza Delivery Tracking System: Solution
Scenario 1: Taking an Order
- Customer calls in and tells order to Employee
- Employee enters order into the system:
- Employee enters pizza details (repeat if multiple pizzas)
- Employee enters customer name, phone number, and address
- System puts order into queue and it shows up on the tracking display
Scenario 2: Updating Status
- An employee takes a pizza from the oven and puts it in a box.
- The employee scans the pizza barcode with a wand attached to the real
time tracking display, indicating that it is ready.
- The pizza tracking display updates to show the ready status of the
Scenario 3: Order/Driver Assignment
In this scenario, there are several orders already in the queue.
- Manager sees 2 'ready' orders on real time tracking display
- Manager assigns a driver to take the 2 orders.
- The driver takes the pizzas for the orders, using a handheld device
to scan the pizzas.
- The pizza tracking display changes to show the status of the two
Scenario 4: Delivery
In this scenario, a driver has accepted an order to deliver and has arrived
at the customer's address.
- Driver arrives at customer's door and scans pizza(s) with handheld.
- The system updates the order status and, using the current system
time, determines whether pizzas are late.
- The system sends the total price and any late discount to the handheld.
- The driver gives the pizzas to the customer, reads the total amount
due from the handheld, and receives that amount from the customer.
Scenario 5: End of Day
- The manager stops taking orders, waits for pizzas in queue to be
delivered, then uses an option on the tracking display UI to generate
the daily report.
- The system writes out the daily statistics in CSV format, suitable
for import into a spreadsheet. The filename is determined by the current
TrackingSystem represents the system as a whole and coordinates startup and
OrderEntryUI takes care of all user interface details for the order entry
part of the system.
TrackingDisplayUI takes care of displaying the current state of the orders
as their state changes.
HandheldGateway represents an interface to a collection of wireless handlheld
devices used for tracking pizzas.
OrderPrinter takes care of printing pizza orders to a printer device.
OrderQueue keeps a queue of order objects and notifies interested parties
when the queue changes.
Order represents a single customer order and is responsible for calculating
the order price and keeping track of its on time status.
Pizza represents a single pizza and is responsible for tracking the pizza's
information and calculating its price.
ScannerGateway represents an interface to a scanner used for marking a pizza
as "ready for delivery".
Customer represents customer information for an order; not intended to be
Driver represents a driver with a collection of orders currently being delivered.
History represents a history data store and is responsible for recording
events of interest for later processing.
Design: Class Diagram