The main method is housed in the BabyDomApp class. This has various tests to run the design pattern outputs.
This solution uses the following design patterns
- Singleton pattern is used in these classes -
- Warehouse (package: Warehouse)
- Cart (package: Cart)
- InvoiceHistory (package: Invoice)
- Builder pattern is used in
- the webpage creation of Product & Bundle pages (package: Page)
- Invoice (package: Invoice)
- Decorator pattern
- Used to add Discount coupons (package: Discount)
- Composite pattern
- Bundle descriptions are composed of Product description (package: Product)
- State pattern
- User logged in or out (package: User)
- Observer pattern
- warehouse notify subscribers (package: Warehouse)