Return to the Restaurant Example
Note: my analysis is different than the textbook
- Problem Statement
- A restaurant owner feels that some amount of automation will help make her business more efficient. She wants to automate the operation of her restaurant as much as possible and has highlighted the following goals
- Automate Order Processing and Billing
- Automate Accounting
- Make supply ordering more accurate so that leftovers at the end of the day and orders which cannot be fulfilled due to missing ingredients are minimized
- Aid in monitoring for theft of supplies
- Collect statistics about sales of different items
- Identify Objects and Classes
- Restaurant, Owner, Bill, Menu, CustomerOrder, Supplier, SupplyOrder, SupplyManager, Dish
- May eliminate objects after further consideration: Owner, Supplier, Dish
- Identify Structures
- CustomerOrder and SupplyOrder are both different types of Orders (new class)
- An Order is an aggregation of one or more LineItems (new class) each of which refers to a Product (new class)
- Menu is a composition of one or more MenuItems (new class) which is a subclass of Product
- Restaurant is an aggregation of zero or more CustomerOrders, a Menu, and a SupplyManager
- Identify Attributes
- A Product has a name, an id, and a price
- A MenuItem has a list of supplies used in its creation
- A Restaurant has a name
- A LineItem has a quantity
- A Bill has a cost
- Identify Associations
- Some associations were specified during the Identify Structres step.
- A SupplyManager has one or more SupplyOrders
- A CustomerOrder has an associated Bill
- Identify services
- An order can produce its total
- A LineItem can produce its cost
- A SupplyManager can update inventory, create a new order, get existing orders, etc.
- A Menu can get its menu items
- A Restaurant can produce a report on sales statistics and a list of its orders
- etc.