download jar relaese from here JAR
➡️ A complete Class Diagram Design is available in the repository folder.
Check it out to quickly understand the structure and architecture of the project!
🧠 This visual reference will help you navigate the codebase more effectively.
C:.
| Main.java
|
+---model
| +---Customer
| | Cart.java
| | Customer.java
| | ProductInCart.java
| |
| +---payment
| | PaymentInterface.java
| | PseudoPayment.java
| |
| \---product
| DigitalProduct.java
| Product.java
| PseudoShipping.java
| Shippable.java
| ShippableProduct.java
|
\---service
CustomerService.java
ProductService.java
Note: Unit tests have been implemented for
CustomerServiceandProductServiceto verify their core functionalities.
- Product Management: Add and display various types of products (digital and shippable).
- Customer Management: Create customers with unique IDs, names, and emails.
- Shopping Cart: Add products to cart, view contents, and calculate total price and shipping.
- Payment Processing: Simulate payment using a pseudo-payment system.
- Shipping Calculation: Based on product weight.
- Balance Management: Deposit funds and check customer balance.
- Java Development Kit (JDK) 11 or higher.
-
Clone the repository:
git clone https://github.com/MostafaOsmanFathi/FawryRiseJourney-EcommerceSystem.git cd FawryRiseJourney -
Compile the Java files: Navigate to the root directory and run:
javac Main.java \ model/Customer/*.java \ model/payment/*.java \ model/product/*.java \ service/*.java -
Run the application:
java Main
Adjust the compilation command if needed depending on your environment or IDE.
When the application starts:
-
Enter your name and email.
-
Choose from the menu:
- Show Products
- Add Product to Cart
- View Cart
- Checkout
- Exit
- Deposit Money
- Show My Balance
- Main.java: Entry point that initializes products and coordinates user input.
- Customer.java: Represents a customer with ID, name, email, and a cart.
- Cart.java: Manages cart contents and handles checkout.
- ProductInCart.java: Tracks product quantities and calculates cost and shipping.
- PaymentInterface.java: Defines payment method operations.
- PseudoPayment.java: Simulates a payment system using a
HashMapfor balances.
- Product.java: Abstract base for all products.
- DigitalProduct.java: Extends
Productwith a digital code. - ShippableProduct.java: Adds weight and shipping for physical products.
- Shippable.java: Interface for defining shipping behavior.
- PseudoShipping.java: Calculates shipping based on weight.