Analysis and Design
Document
Version 4.1
Date 11/30/2014
Restaurant Automation System
Object Oriented Software Engineering
SE 6329
Aneri Shah
Danny Sundaresan
Malika Pahva
Siddharth Shah
Vidhi Gavadia
Page 1
Version Date Description Author
1.0 10/27/2014 Designed Use case and Domain Aneri Shah, Danny
Model Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
2.0 11/03/2014 Updated Use case and Domain Aneri Shah, Danny
Model. Compiled use case Sundaresan, Malika
descriptions Pahva, Siddharth Shah,
Vidhi Gavadia
3.0 11/10/2014 Updated use case, use case Aneri Shah, Danny
descriptions and domain Sundaresan, Malika
model. Compiled system Pahva, Siddharth Shah,
sequence diagram, operational Vidhi Gavadia
contract and architectural
diagrams.
4.0 11/19/2014 Updated use case, use case Aneri Shah, Danny
descriptions, system sequence Sundaresan, Malika
diagram and operational Pahva, Siddharth Shah,
contract. Vidhi Gavadia
Added Use case realization and
Design class diagrams.
4.1 11/30/2014 Updated use case, use case Aneri Shah, Danny
descriptions, system sequence Sundaresan, Malika
diagram, operational contract, Pahva, Siddharth Shah,
Use case realization and Design Vidhi Gavadia
class diagrams.
Revision History
Page 2
Table of Contents
1. Use Case Diagram 4
2. Prioritized List of Use Cases 8
3. Use Case Description 11
4. Domain Model 20
5. System Sequence Diagram 22
6. Operation Contracts 27
7. Use Case Realization 31
8. Design Class Diagram 34
9. High-Level Architecture Diagram 37
Page 3
1. Use Case Diagrams
Version 4.1
11/30/14
Restaurant Automation System
Page 4
Version Date Description Author
1.0 10/27/2014 Designed Use case Aneri Shah, Danny
Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
2.0 11/03/2014 Updated Use cases Aneri Shah, Danny
Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
3.0 11/10/2014 Updated Use cases Aneri Shah, Danny
Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
4.0 11/19/2014 Updated Use cases Aneri Shah, Danny
Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
4.1 11/30/2014 Updated Use cases Aneri Shah, Danny
Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
Revision History
Page 5
Use Case Diagram
Page 6
Description
Assign Table: The host will be able to assign a table to a waiter once he has assigned
the same to a patron.
View Table Status: The host, waiter and bus boy would be able to see the status of
each table with the following color code. Red mean dirty, green is open and yellow is
occupied.
Change Table Status: The host would be able to assign tables and change their status
from green to yellow. The waiter would be able to change the table status from yellow
to red and finally the bus boy would be able to change status from red to green.
Handle Order: The waiter would be able to browse the menu of the items available and
place order for each table based on the patrons choice. The cook would be able to view
these orders.
Handle Payment: The waiter handles the payment made by the patron for the placed
order.
Process Order: The cook would be able to process the order and notify the appropriate
waiter once the food is ready.
Modify order: Once the waiter has placed the order, he/she can modify it by adding or
removing items if the patron requests for it.
Alter Floor Plan: The manager would be able to change the position of the tables in the
restaurant.
Inventory Tracking : The manager would be able to track the inventory of the restaurant
Handle Employee Profile: The manager would be able to create a new profile when a
new employee joins the restaurant and can modify their status anytime he wants.
Sales Analysis: The manager would be able to view the daily /monthly / yearly sales of
the restaurant.
Track Employee Activity: The manager can track how long the cook takes to prepare an
order, then he can also track the efficiency of a waiter based on patrons rating and
finally he can also track how soon the bus boy cleans the table.
Page 7
Authorize Waiter Activity: The manager can restrict the activity of the waiter in the
system.
2. Prioritized List of Use Cases
Version 4.1
11/30/14
Restaurant Automation System
Page 8
Version Date Description Author
1.0 10/27/2014 Prioritized use cases Aneri Shah, Danny
Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
2.0 11/03/2014 Updated prioritized use cases Aneri Shah, Danny
Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
3.0 11/10/2014 Updated prioritized use cases Aneri Shah, Danny
Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
4.0 11/19/2014 Updated prioritized use cases Aneri Shah, Danny
Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
4.1 11/30/2014 Updated prioritized use cases Aneri Shah, Danny
Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
Revision History
Page 9
Priority List
1. Handle Order
2. Process Order
3. Assign Table
4. Change Table Status
5. Handle Payment
6. View Table Status
7. Inventory Tracking
8. Alter Floor Plan
9. Sales Analysis
10. Track Employee Activity
11. Handle Employee Profile
12. Authorize Waiter Activity
Fully Dressed Casual Brief
1. Handle Order 2. Process Order 3. Assign Table
4. Change Table Status
5. Handle Payment
6. View Table Status
7. Inventory Tracking
8. Alter Floor Plan
9. Sales Analysis
10. Track Employee
Activity
11. Handle Employee
Profile
Page 10
12. Authorize Waiter
Activity
3. Use Case Description
Version 4.1
11/30/14
Restaurant Automation System
Page 11
Version Date Description Author
2.0 11/03/2014 Use case description based on Aneri Shah, Danny
priority. Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
3.0 11/10/2014 Updated fully dressed use case Aneri Shah, Danny
description Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
4.0 11/10/2014 Updated fully dressed, casual Aneri Shah, Danny
and brief use case description Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
Revision History
Page 12
Use Case Name Login
ID 1
Brief description The restaurant staffs can log into the system.
Primary actors Manager, Host, Waiter, Busboy
Second actors None
Pre Conditions The restaurant staff must have an account in the system.
Main flow 1. The staff opens the system
2. The staff enters the username and password via the keyboard in
the respective fields provided.
3. The system verifies the user.
Post conditions 1. The restaurant staff is logged in to the system.
2. The restaurant staff can access the assigned home page.
Non-Functional 1. The login should happen within 5 seconds.
Requirements
2. Multiple users can be logged in at any given time.
Technology and Data The restaurant staff can use his/her respective portable devices
Variation List
Open Issues 1. Will the account freeze if the wrong username and password is
typed more than three times?
Use Case Name Handle order
ID 2
Page 13
Brief description The waiter handles the order placed by the patron.
Primary actors Waiter
Second actors Cook
Pre Conditions The table must be occupied by the patron.
Main flow 1. Include (Login).
2. The system displays the list of tables assigned to the waiter.
3. Include (Change Table Status).
4. The patron specifies the items he would like to have.
5. The waiter starts a new order.
6. The waiter selects the “add item” option in the system.
7. The system generates a list of categories available in the menu.
8. The waiter selects the specific category under which he could find
the specified item.
9. The waiter adds the item to the order.
10. The waiter repeats step 7 to 10 until all the items have been added
to the order.
11. The waiter places the order.
12. The system adds the order to the order queue.
13. The system notifies the cook that a new order is added to the queue.
*a At any point, the waiter modifies the placed order as per the
patron’s request.
Post Conditions None
Non-Functional The order queue should get updated in about 2 seconds once a new
Requirements order is updated.
Technology and Data The restaurant staff can use his/her respective portable devices.
Variation List
Open Issues 1. Can the waiter cancel the order once it has been placed?
2. Can the waiter add specific comments from the patron about an
item so that the cook can view them?
Use Case Name Process Order
Page 14
ID 3
Brief description The cook would be able to process the order and notify the
appropriate waiter once the food is ready.
Primary actors Cook
Second actors None
Pre Conditions Order is added to the order queue.
Main flow 1. Include (Login).
2. Includes (View order)
3. The cook selects the first order in the order queue.
4. The cook changes the order status to ready once the food items
have been cooked.
Post Conditions The system notifies the waiter that the order is ready.
Use Case Name Assign table
ID 4
Brief description The host can assign un-occupied tables to patrons.
Primary actors Host
Second actors None
Use Case Name Handle Payment
ID 5
Brief description The waiter handles the payment made by the patron for the placed
order.
Primary actors Waiter
Second actors None
Page 15
Use Case Name Change Table Status
ID 6
Brief description The host, waiter, busboy can change the status of the table from free to
occupied, occupied to dirty, dirty to free respectively.
Primary actors Busboy, Waiter, Host
Second actors None
Use Case Name Inventory Tracking
ID 7
Brief description The manager keeps track of the inventory required for the restaurant.
Primary actors Manager
Second actors None
Use Case Name Alter Floor Plan
ID 8
Brief description The manager changes the position of the tables in the restaurant and
re- arranges them whenever new tables have been added to the floor
plan.
Primary actors Manager
Second actors None
Page 16
Use Case Name Sales Analysis
ID 9
Brief description The manager views the daily /monthly / yearly sales of the restaurant.
Primary actors Manager
Second actors None
Use Case Name Track Employee Activity
ID 10
Brief description The manager keeps track of how long the cook takes to prepare an
order. He/she can also track the efficiency of a waiter as well as how
soon the busboy can clean the table.
Primary actors Manager
Second actors None
Use Case Name Handle Employee Profile
ID 11
Brief description The manager creates a new profile when a new employee joins the
restaurant as well as modify the profile of other employees when
needed.
Primary actors Manager
Second actors None
Page 17
Use Case Name Authorize Waiter Activity
ID 12
Brief description The manager restricts the activities of the waiters in the system.
Primary actors Manager
Second actors None
Use Case Name Modify Order
ID 13
Brief description The waiter modifies the order if the patron requests for it.
Segment 1
Primary actors Waiter
Second actors None
Segment 1 Pre The order is placed by the waiter.
Conditions
Segment 1 flow The waiter adds or removes items from the placed order.
Segment 1 Post The order has been modified.
Conditions
Page 18
4. Domain Model
Version 4.1
11/30/14
Restaurant Automation System
Page 19
Version Date Description Author
1.0 10/27/2014 Designed domain model Aneri Shah, Danny
Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
2.0 11/03/2014 Updated domain model Aneri Shah, Danny
Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
3.0 11/10/2014 Updated domain model based Aneri Shah, Danny
on operational contract Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
4.1 11/30/2014 Updated domain model Aneri Shah, Danny
Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
Revision History
Page 20
Domain Model
Page 21
5. System Sequence Diagram
Version 4.1
11/30/14
Restaurant Automation System
Page 22
Version Date Description Author
3.0 11/10/2014 Designed system sequence Aneri Shah, Danny
diagram Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
4.0 11/19/2014 Updated system sequence Aneri Shah, Danny
diagram Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
4.1 11/30/2014 Updated system sequence Aneri Shah, Danny
diagram Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
Revision History
Page 23
System Sequence Diagram
Page 24
Reference Login
Page 25
Reference Change Table Status
Page 26
6. Operation Contracts
Version 4.0
11/19/14
Restaurant Automation System
Page 27
Version Date Description Author
3.0 11/10/2014 Constructed operation Aneri Shah, Danny
contracts Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
4.0 11/19/2014 Updated operation contracts Aneri Shah, Danny
Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
Revision History
Page 28
Operation Contracts
Contract CO1: enterCredentials(username, pwd)
Cross Reference: Handle Order
Pre Conditions: None
Post Conditions: - e.employeeUserId becomes username and e.employeePassword becomes
pwd.
Contract CO2: updateTable(tableId, status)
Cross Reference: Change Table Status
Pre Conditions: - A table instance t has already been created
- A waiter instance e was associated with the table instance t.
Post Conditions: - t.tableStatus becomes status based on tableId match.
Contract CO3: makeNewOrder()
Cross Reference: Handle Order
Pre Conditions: A waiter instance e was associated with the table instance t.
Post Conditions: - An order instance o is created.
- Attributes of o are initialized.
- o is associated with the table instance t.
- o is associated with the waiter instance e.
Contract CO4: selectMenu()
Cross Reference: Handle Order
Page 29
Pre Conditions: - A menu instance m already exists.
Post Conditions: - FoodCategory instance c is associated with current menu.
Contract CO5: selectCategory(categoryid)
Cross Reference: Handle Order
Pre Conditions: - A menu instance m already exists.
- A FoodCategory instance c already exists.
- A FoodItem instance i has already been created.
- c has been associated with the menu.
Post Conditions: - The FoodCategory instance c is associated with the FoodItem instance i
based on categoryid match.
Contract CO6: selectItem(itemId,quantity)
Cross Reference: Handle Order
Pre Conditions: - Order instance o has already been created.
Post Conditions: - A OrderLineItem instance oli is created.
- Attributes of oli are initialized.
- oli.quantity becomes quantity.
- Oli is associated with the current order o.
- oli is associated with the FoodItem based on the itemId match.
Contract CO7: placeOrder (id)
Cross Reference: Handle Order
Pre Conditions: - A waiter instance e was associated with the table instance t.
- A OrderQueue instance q already exists
Page 30
Post Conditions: - The current order instance o, is associated with the OrderQueue instance q.
7. Use Case Realization
Version 4.1
11/30/14
Restaurant Automation System
Page 31
Version Date Description Author
4.0 11/19/2014 Designed Use Case Realization Aneri Shah, Danny
Diagram Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
4.1 11/30/2014 Updated Use Case Realization Aneri Shah, Danny
Diagram Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
Revision History
Page 32
Use Case Realization
Page 33
8. Design Class Diagram
Version 4.1
11/30/14
Restaurant Automation System
Page 34
Version Date Description Author
4.0 11/19/2014 Designed Design Class Diagram Aneri Shah, Danny
Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
4.1 11/30/2014 Updated Design Class Diagram Aneri Shah, Danny
Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
Revision History
Page 35
Design Class Diagram
Page 36
9. High-Level Architecture Diagram
Version 4.0
11/19/14
Restaurant Automation System
Page 37
Version Date Description Author
3.0 11/10/2014 Designed High-Level Aneri Shah, Danny
Architecture Diagram Sundaresan, Malika
Pahva, Siddharth Shah,
Vidhi Gavadia
Revision History
Page 38
Logical View (Layers)
Page 39
Logical View (Component Diagram)
Page 40
Deployment View
Page 41