Instructions
In this lab you’re tasked with designing a system for managing inventory in a retail store. The system needs to handle different types of products (for example, electronics, clothing, and groceries) and their respective attributes (such as price, quantity, and expiration date).
Additionally, the system should support various operations such as adding new products, updating inventory levels, and generating reports on sales and stock levels.
Make sure to implement the system using appropriate design patterns to ensure flexibility, scalability, and ease of maintenance.
As part of this exercise you will need to plan an create all the classes and interfaces required to implement the inventory management system. You may want to make additional files that were not part of the original setup.
Here’s an example of the expected output for the program:
Product added: Product{name='Smartphone', type='Electronics', price=599.99, quantity=10, expirationDate=Wed Apr 10 09:48:58 EDT 2024}
Product added: Product{name='T-shirt', type='Clothing', price=19.99, quantity=50, expirationDate=null}
Product added: Product{name='Milk', type='Groceries', price=2.99, quantity=20, expirationDate=Wed Apr 10 09:48:58 EDT 2024}
Inventory updated for Smartphone: New quantity = 8
Generating inventory reports...
Inventory Report:
-----------------------------------------------------------------------------------------
Name Type Price ($) Quantity Expiration Date
-----------------------------------------------------------------------------------------
Smartphone Electronics 599.99 8 Wed Apr 10 09:48:58 EDT 2024
T-shirt Clothing 19.99 50 N/A
Milk Groceries 2.99 20 Wed Apr 10 09:48:58 EDT 2024
-----------------------------------------------------------------------------------------
Please note that this output serves as a guideline for the kind of information your program should produce and report. However, the exact formatting of the output, including alignment, spacing, and the representation of null values or dates, is flexible and can be adjusted according to your preferences.
![[tktk Module Name] - Exercise](/java-design-patterns-lab/exercise/assets/design-patterns-exercise.png)