A Java-based online shopping application designed to offer a comprehensive shopping experience, integrating product browsing, cart management, and multiple payment methods. This project utilizes key Java concepts such as classes, inheritance, arrays, and exception handling to provide a functional, scalable solution.
The Online Shopping System allows users to:
- Browse Product Catalogue: View a categorized list of products for easy navigation.
- Manage Shopping Cart: Add or remove products from the cart seamlessly.
- Check Product Availability: Ensure that products are in stock before completing the purchase.
- Account Management: Handle user registration, login, and account management.
- Payment Methods: Choose from online payments or cash on delivery options.
- Print Slip: Generate and print a detailed receipt for each completed transaction.
- Terminate Process: End the session securely and clear temporary data.
- Product Catalogue: An organized list of available products, categorized for easy browsing.
- Shopping Cart: Add or remove items with the ability to view cart contents in real-time.
- Account Management: Secure user login and account details management.
- Product Availability Check: Ensure product stock levels are checked before proceeding with the purchase.
- Print Transaction Slips: Automatically generate and print receipts after purchase.
- Payment Methods: Seamless support for online payments and cash on delivery options.
- Exception Handling: Handles both user-defined and system-generated exceptions for better error management.
- User Input: Collect user details for account management, product selection, and payment.
- Classes and Objects: Models various components of the system such as products, users, and transactions.
- Inheritance: Implements a class hierarchy to structure related components logically.
- Arrays & ArrayLists: Manages collections of products and cart items efficiently using arrays and ArrayLists.
- Exception Handling: Robust error handling to prevent and manage issues during operation.
- Availability.java: Manages product availability and checks stock levels.
- Customer.java: Handles customer account creation, login functionality, and account management.
- Item.java: Represents individual products in the product catalogue.
- Item_Add_Drop.java: Manages adding/removing items to/from the shopping cart.
- Mainbody.java: Contains the core logic for interacting with the user and driving the application flow.
- Quantity.java: Handles item quantity management in the shopping cart.
- Programming Language: Java
- Data Structures: Arrays, ArrayLists
- Exception Handling: Both user-defined and system-generated exceptions to ensure robust error management.
- Add Items: Select products from the catalogue and add them to the cart.
- Remove Items: Remove unwanted items from the cart.
- Product Check: Verify if a product is available in stock before purchase.
- Online Payment: Provide your payment details to process the online transaction.
- Cash on Delivery: Opt to pay in cash upon delivery of the product.
- Print Receipt: After completing the purchase, print a transaction receipt for your records.
1️⃣ Clone the Repository
git clone https://github.com/your-username/online-shopping-system.git
cd online-shopping-system
2️⃣ Compile the Program
javac *.java
3️⃣ Run the Program
java Mainbody
- ✅ User-Friendly Interface: Designed for ease of use.
- ✅ Real-Time Product Availability Check: Ensures that users only purchase available products.
- ✅ Multiple Payment Options: Flexibility with both online payments and cash on delivery.
- ✅ Transaction Receipt Generation: Automatic printing of receipts after purchase.
- ✅ Robust Exception Handling: Effective error management for smooth operation.
- ✅ Efficient Data Structures: Optimized use of arrays and ArrayLists for storing products and cart items.