Download presentation
Presentation is loading. Please wait.
Published bySamantha Poole Modified over 9 years ago
1
MTO Ordering System HENRY, HAYDEN, AND KELLIE
2
Purpose Our project modeled an ordering system similar to Sheetz It allowed a user to order a variety of food and drinks by clicking buttons on a screen
3
Key Components GUI – Hayden State, factory, and façade patterns Ordering – Kellie State, singleton, and observer patterns Food Options – Henry Strategy, decorator, and template patterns
4
Development Process First we decided on a general UML and then assigned parts to each person so that each person had three patterns Each person came up with their own UMLs for their patterns We coded our own parts and resolved conflicts as we put it together
5
Ordering Singleton pattern for the order so you can not have more than one order at a time Observer pattern for the receipt printer so the order can notify the printer when a receipt needs to be printed State pattern for the order so different actions can happen when it is in different states
6
State Pattern for Ordering Three States: Idle State In the idle state, you can just begin the order and this takes you to the ordering state Ordering State In the ordering state, you can add items. You can also cancel the order which brings you back to idle and complete the order which brings you to the complete state Complete Order State In the complete order state you can pay for the order or cancel your order, both bring you back to the idle state This pattern is completed in the code
7
Inventory State pattern to keep track of availbility of product. OutOfStockState would prevent the order from using the product if we ran out of that product.
8
User Interface Façade pattern used to simplify the ordering process for the user. Factory pattern used to create the screens as we needed for the menu system.
9
Food Options Strategy Pattern to control restrictions on the order Template Pattern to build the food Order Decorator Pattern to add toppings to the food order
10
Decorator Pattern for Food Orders Adds Toppings/Condiments to the food order Allows for toppings to be added to any food item, within that items restrictions, without having an individual class for each possible combination Allows for easy addition of more toppings, or food options
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.