This project is a Java-based backend-style application designed to demonstrate strong object-oriented programming principles, clean architecture, and separation of responsibilities.
The system simulates a simple inventory and sales workflow where products are stored in a catalog, inventory levels are tracked by SKU, and completed sales are recorded in a sales ledger. All business rules are enforced through a centralized service layer rather than a user interface.
- Open the project in IntelliJ IDEA (or another Java IDE).
- Ensure Java is installed (Java 17 or later recommended).
- Run the
Mainclass to execute the demo.
- The program runs automatically without user input.
- The console output demonstrates:
- Product creation and catalog storage
- Inventory restocking
- Successful and failed sales attempts
- Sales ledger records
- Total revenue calculation
- Review the console output to observe how inventory, sales, and revenue are managed through the service layer.
To recreate the development environment, you need the following software:
- Java Development Kit (JDK) 17+
- IntelliJ IDEA (Community Edition)
- Git (bundled with IntelliJ)
- GitHub account for source control
The following resources were helpful while developing this project:
The following improvements could be added in the future:
- Prevent duplicate SKUs from being added to the product catalog
- Replace
nullreturn values with a result or response object - Add profit calculations using product cost data
- Persist inventory and sales data to a file or database
- Expand the system with a simple user interface or REST API