A robust console-based e-commerce marketplace application built in Java. It allows users to register, buy and sell products, manage custom persistent shopping carts, and features a secure admin dashboard to monitor sales metrics and top consumers.
- Java SE (JDK 8+)
- Plain Text Database File Persistence
- OOP Architecture (Object-Oriented Design)
- Console User Interface
# Clone the repository git clone https://github.com/manubag/software-design-midterm.git # Navigate to the directory cd software-design-midterm # Compile all Java files into an output folder javac -d out src/*.java # Run the compiled application java -cp out Main
Ensure you run the application from the project root directory so that local text database files (users.txt, Items.txt, and transactions.txt) are created and read correctly.
- Dual Marketplace Roles β Seamless switching between specialized "Buy Menu" and "Sell Menu" roles for active users.
- Inventory Management β Sellers can add new items, replenish stock levels, adjust unit prices, edit product details (name, category, description), and list low-stock items.
- Persistent Shopping Carts β Dedicated user carts saved under
cart_<userID>.txt, dynamically loading and saving items across active user sessions. - Targeted Checkouts β Multi-option checkout support enabling users to purchase their entire cart, items from a specific seller, or individual selected products.
- Secure Admin Panel β Password-protected administrator console (
H3LLo?) to view users/sellers, check period sales, seller performance, and top shoppers ("Shopaholics"). - Transactional Ledger β Auto-saving financial statements stored persistently within local flat-file storage files.
The system follows a clean object-oriented architecture designed in pure Java:
- Modular Structure: Key domain entities (
Users,Items,Cart,Transactions) defined as individual classes linked by logical associations and inheritance. - Custom Serialization: Custom parsing mechanisms designed to serialize and deserialize object properties into plain-text databases using delimiters (
|and;). - File System Database: Employs pure Java I/O (
Scanner,FileWriter,PrintWriter) to orchestrate a fast, lightweight, and fully persistent offline database system.
/
βββ src/
β βββ Cart.java # Shopping cart entity, item aggregation, and cart file I/O
β βββ Items.java # Product details, seller product listings, and stock management
β βββ Main.java # Central application menu orchestration and user control flow
β βββ Transactions.java # Financial ledger, transactional records, and sales reports
β βββ Users.java # User profile entity, auth procedures, and serialization logic
βββ Items.txt # Flat-file database containing all listed products
βββ transactions.txt # Local database storing all transactional checkout records
βββ users.txt # Local database storing registered user profiles
βββ README.md # Project documentation
- James β github.com/tengkyuuu
- Rhett β github.com/wayne2604