Skip to content

FadyAdel10/EcommerceWithJava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ecommerce with Java

🛒 Java E-commerce System

A modular, object-oriented Java console application that simulates a basic e-commerce workflow.
It supports cart management, product expiration, shipping logic, and customer checkout with complete validation and exception handling.


📦 Features

  • ✅ Define general products with name, price, and availableQuantity
  • 📆 Support for expirable products (e.g., Cheese, Biscuits)
  • 🚚 Support for shippable products (e.g., TV, Cheese) with weight info
  • 🛒 Customers can add products to a cart with quantity checks
  • ⚠️ Throws exceptions for:
    • Out-of-stock items
    • Expired items
    • Empty cart
    • Insufficient customer balance
  • 💳 Checkout process:
    • Calculates subtotal, shipping, and total amount
    • Deducts from customer's balance
    • Displays receipt and shipping notice

🧰 Technologies Used

  • Java 17+
  • OOP design principles
  • Custom exceptions
  • No external libraries (pure Java)

Examples and usecases

  • All products are available, None are expired, The customer has enough balance, Cart is not empty, Including shippable and non-shippable products. image image
  • All products are available, None are expired, The customer has enough balance, Cart is not empty, non-shippable products are there. image image
  • Insufficient Customer balance (balance is 50, products total is 67.60). image image
  • Insufficent product quantity (6 Mobile scratch card are required to be added but 5 only available). image image
  • Empty cart. image image
  • Expired products(biscuits) image image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages