Overview
JavaMart is a Java desktop application with graphical and console interfaces for managing store operations. It models products and customers, then carries those records through cart, payment, and invoice workflows.
Context
The application supports a small store workflow with the same features available through a Swing interface or a text-based console mode. Product, customer, and invoice records are stored in local text files rather than a database.
Implementation
The GUI loads catalog and customer data at startup, uses domain objects for products and customers, and keeps cart quantities in application state. Checkout applies quantity discounts and tax, offers full or installment payment choices, updates the customer record, and appends a detailed invoice to a file.
Execution flow
User action → Swing or console workflow → product, customer, and cart update → discount and tax calculation → customer-file update → invoice output.
Technical decisions
Using the same model across GUI and console entry points keeps the retail workflow available in two interaction styles. Text-file persistence makes the project’s record updates easy to inspect and keeps the application self-contained.
Validation
The repository documents compilation and separate GUI and console launch commands. Its interface code also handles empty customer IDs, invalid inputs, and empty-cart cases before checkout.