A comprehensive Java Swing application for managing a computer accessories retail store, featuring role-based access control, inventory management, and e-commerce functionality.
- Java Development Kit (JDK) 8 or higher
- Any Java IDE or command line tools
-
Compile the project:
mkdir bin javac -d bin src/*.java -
Run the application:
java -cp bin MainFrame
-
Login with default credentials:
- Admin: ID: 101, Username: user1, Role: admin
- Customer: ID: 102, Username: user2, Role: customer
- Role-based login (Admin/Customer)
- Secure user management
- Session handling
- Product Management: Add, update, view inventory
- Inventory Control: Monitor stock levels
- Data Validation: Comprehensive input validation
- Product Browsing: View available products
- Shopping Cart: Add/remove items with quantities
- Search: Find products by barcode or criteria
- Checkout: PayPal and Credit Card payments
- Receipts: Transaction records
- Keyboards: Gaming, Standard, Flexible layouts
- Mice: Gaming and standard with button configurations
- Connectivity: Wired and wireless options
- Brands: Logitech, Corsair, Razer, Microsoft, Apple, etc.
MainFrame: Login interface and entry pointAdminFrame: Administrative interfaceCustomerFrame: Customer shopping interfaceProduct: Abstract base classKeyboard&Mouse: Product implementationsUser: Authentication and user managementStockManager: Inventory managementBasketManager: Shopping cart functionality
- Abstract Factory: Product hierarchy
- Strategy: Payment methods
- Observer: GUI event handling
- Singleton: Utility classes
├── src/ # Java source files
│ ├── MainFrame.java # Application entry point
│ ├── AdminFrame.java # Admin interface
│ ├── CustomerFrame.java # Customer interface
│ ├── Product.java # Abstract product class
│ ├── Keyboard.java # Keyboard implementation
│ ├── Mouse.java # Mouse implementation
│ └── [Other classes] # Supporting classes
├── data/ # Data files
│ ├── UserAccounts.txt # User credentials
│ └── Stock.txt # Product inventory
├── README.md # This file
├── BUILD.md # Build instructions
├── DOCUMENTATION.md # Detailed documentation
└── .gitignore # Git ignore rules
This project demonstrates:
- Object-Oriented Programming: Inheritance, polymorphism, encapsulation
- GUI Development: Java Swing, event-driven programming
- File I/O: Data persistence and management
- Business Logic: E-commerce functionality
- Error Handling: Input validation and user feedback
- Software Architecture: Clean code and separation of concerns
The system includes pre-loaded products:
- Various keyboards from Logitech, Corsair, Microsoft, Apple
- Gaming and standard mice from Logitech, Razer, Anker
- Price ranges from budget (£4.99) to premium (£85.50)
- Mixed connectivity options
- Extend the
Productabstract class - Implement required methods
- Update
StockManagerparsing logic - Add validation rules
- All GUI components are in respective Frame classes
- Adjust bounds and components for layout changes
- Add tabs to existing TabbedPanes
- README.md: Overview and quick start guide
- BUILD.md: Detailed build instructions
- DOCUMENTATION.md: Comprehensive technical documentation
Perfect for demonstrating:
- Java programming fundamentals
- Object-oriented design principles
- GUI development skills
- Software engineering practices
- Business logic implementation
This system showcases a complete e-commerce solution with proper architecture, user management, and business logic implementation.