Project
Deadline: November 30, 2025 at 08:00:00
Plagiarism is theft and is unacceptable. It undermines creativity, damages intellectual integrity, and destroys the purpose of learning. This also applies to contract cheating (opens in a new tab) and the mindless use of generative chatbots (opens in a new tab).1
Requirements
The project is about running a single online warehouse from end to end. Staff prepare the environment by adding customers (identifier and name), stocking a catalogue of books, electronics, and groceries, and defining time-bounded promotions. Discounts may be fixed-amount or percentage, and all prices are shown in QAR with shipping calculated from a simple weight-based rate table. Staff can list existing discounts and activate/deactivate them; when a discount is activated, any previously active discounts with overlapping date ranges are automatically deactivated, regardless of their type.
Customers access the system by logging in with their assigned identifier, so every action is recorded to the correct account. After signing in, they browse the inventory by category, add and remove items in a straightforward cart, and proceed to checkout when ready. At checkout, the system automatically applies any active discount that is valid on the current date, prompts for a delivery address, calculates shipping from the total weight of the items, and records payment by card or cash. A successful checkout converts the cart into an order and creates a shipment for delivery to the provided address, while inventory levels decrease to reflect the sales and maintain an accurate picture of stock on hand.
Following purchases, staff oversee fulfillment by updating each shipment’s status through a clear sequence (created, packed, in transit, out for delivery, and delivered) so progress is easy to track. When needed, they generate concise operational reports that summarize real activity in the warehouse: which discounts are active today and what has run historically, current stock and inventory valuation, orders placed today, sales by customer, total revenue, shipments by status and outstanding deliveries, and how discounts were used at checkout. These summaries are derived directly from customer transactions, providing a dependable view of performance and customer behavior.
You are asked to implement this as a straightforward, menu-driven console application for one warehouse. Provide a staff menu that enables adding customers, managing and toggling discounts with the no-overlap rule, stocking products with price/weight/quantity, updating shipment statuses, and running the operational reports described above. Provide a customer menu that enables login by identifier, browsing the catalogue, preparing and editing a cart, and checking out with a clear breakdown of subtotal, discount, shipping, and total in QAR, payable by card or cash. Keep prompts unambiguous, include sufficient seeded data for demonstration, and ensure behavior follows the discount, checkout, shipping, inventory, and reporting rules outlined in this introduction.
Design
This section maps the implementation to its building blocks by listing each class, its key fields, and its public methods, and briefly explaining how these elements support the operations described earlier.
A full class diagram is available as a PDF file; constructors and getters/setters have been omitted for clarity.
Abstract Classes
Discount
Fields
String code: discount code used in receipts and reports.LocalDate startDate: first valid date inclusive for discount.LocalDate endDate: last valid date inclusive for discount.boolean active: whether discount participates in pricing decisions.
Methods
String getCode(): return discount code for external reference.LocalDate getStartDate(): return inclusive starting date of discount.LocalDate getEndDate(): return inclusive ending date of discount.boolean isActive(): return whether discount is currently active.void setActive(boolean active): set active flag without overlap enforcement.double calculateDiscount(double subtotal): compute the discount value based on provided subtotal.String getDetails(): compose readable description of discount details.
Product
Fields
String id: product code used for selection and reference.String name: human readable product name for display purposes.String currency: fixed currency code for price display.double price: current unit price shown to customers.double weightKg: unit weight used for shipping calculations.int stockQty: current inventory quantity available for sale.
Methods
String getCategory(): return product category name for grouping.String getId(): return product identifier string for reference.String getName(): return product name for display outputs.double getPrice(): get current unit price in QAR.void setPrice(double price): update current unit price stored internally.double getWeightKg(): get per unit weight in kilograms.void setWeightKg(double weight): update per unit weight in kilograms.int getStock(): get current available stock quantity for sales.void setStock(int stock): update available stock quantity after changes.String basicInfo(): compose concise line summarizing product details.
Classes
Address
Fields
String street: street and house information for delivery.String city: city component of the destination address.String country: country component of the destination address.
Methods
String toSingleLine(): format address into single readable line.
App
Methods
public static void main(String[]): launch app, load seed data, show menus.
BookProduct
Specializes (extends) Product.
Methods
String getCategory(): return category name for each concrete type.
CardPayment
Realizes (implements) Payment.
Fields
String currency: currency string, expected to be QAR.double amount: amount charged to the customer card.String cardHolder: name printed on the payment card.String maskedNumber: masked card number shown for confirmation.
Methods
String currency(): return currency code string for payment.double amount(): return paid amount as double value.String summary(): return compact description for card payment.
CartItem
Fields
Product product: referenced product object for this cart line entry.int quantity: number of units selected for purchase.
Methods
Product getProduct(): return underlying product for this cart item.int getQuantity(): return quantity currently set for item.void setQuantity(int quantity): update item quantity to provided amount.double lineSubtotal(): compute price times quantity for line.double lineWeight(): compute weight times quantity for line.String info(): formatted one line description for cart line.
CashPayment
Realizes (implements) Payment.
Fields
String currency: currency string, expected to be QAR.double amount: amount paid using cash at checkout.
Methods
String currency(): return currency code string for payment.double amount(): return paid amount as double value.String summary(): return compact description for cash payment.
Customer
Fields
String id: unique customer identifier used for login selection.String name: customer display name shown on receipts.
Methods
String getId(): return customer identifier string for reference.String getName(): return customer name for display outputs.
CustomerMenu
Methods
static void run(Scanner scanner, WarehouseSystem system): handle customer actions through interactive console loop.
ElectronicProduct
Specializes (extends) Product.
Methods
String getCategory(): return category name for each concrete type.
FixedAmountDiscount
Specializes (extends) Discount.
Fields
double amountQar: fixed deduction amount expressed in QAR.
Methods
double calculateDiscount(double subtotal): return fixed amount regardless of subtotal.String getDetails(): format details including amount and dates.
GroceryProduct
Specializes (extends) Product.
Methods
String getCategory(): return category name for each concrete type.
Order
Fields
String id: unique order identifier generated sequentially for reports.Customer customer: customer who placed this specific order.LocalDate date: calendar date when the order was created.List<OrderItem> items: immutable list of order item snapshots.double subtotal: sum of item line totals before discount.double discountAmount: applied discount amount value subtracted from subtotal.double shippingFee: shipping cost computed from total weight.double total: final amount payable after discount and shipping.Discount appliedDiscount: reference to discount used ornullif none was applied.
Methods
String getId(): return order identifier string for reference.Customer getCustomer(): return customer who placed this order.LocalDate getDate(): return order date as local date.List<OrderItem> getItems(): return immutable list of order items.double getSubtotal(): return subtotal before discount is applied.double getDiscountAmount(): return discount amount applied to subtotal.double getShippingFee(): return shipping fee added to total.double getTotal(): return final total including shipping and discounts.Discount getAppliedDiscount(): return applied discount ornullif none was applied.
OrderIdGenerator
Fields
int counter: static running counter for sequential order identifiers.
Methods
static String nextId(): increment counter and return formatted order id.
OrderItem
Fields
Product product: product snapshot reference associated with order entry.int quantity: quantity purchased for this order line.double unitPriceQar: unit price captured at order time.
Methods
Product getProduct(): return product associated with this order line.int getQuantity(): return quantity purchased for this order line.double getUnitPriceQar(): return unit price stored in QAR.double lineTotal(): compute line total equals unit times quantity.
PercentageDiscount
Specializes (extends) Discount.
Fields
double percent: percentage value to deduct from subtotal.
Methods
double calculateDiscount(double subtotal): return subtotal times percentage divided by 100.String getDetails(): format details including percent and dates.
ProductListView
Methods
static void printCategorized(List<Product> products): display products grouped by their category headings.
RateTable
Fields
double[] maxWeights: ascending maximum weights for each pricing tier.double[] feesQar: fee values in QAR aligned with tiers.
Methods
double shippingFeeFor(double totalWeightKg): return fee corresponding to specified total weight.
ReportService
Methods
static void runAllReports(WarehouseSystem system): print all staff reports using current state.
SeedData
Methods
static void load(WarehouseSystem system): populate system with sample data for testing.
Shipment
Fields
String orderId: identifier of the order being shipped.Customer customer: customer recipient reference for this shipment.Address address: destination address where shipment will deliver.ShipmentStatus status: current shipment lifecycle state for tracking.double totalWeightKg: total shipment weight used for context.
Methods
void setStatus(ShipmentStatus status): update shipment status to provided lifecycle value.ShipmentStatus getStatus(): return current shipment status for display.String basicInfo(): format concise tracking line for shipment.
ShoppingCart
Fields
List<CartItem> items: list of cart items for current session.
Methods
void addItem(Product product, int quantity): add item/merge with existing product line.void removeIndex(int index): remove an item by its displayed index.boolean isEmpty(): determine whether the cart currently has items.void clear(): remove all items from the shopping cart.List<CartItem> getItems(): return list of cart items for inspection.double subtotal(): sum all line subtotals across cart items.double totalWeight(): sum all line weights across cart items.void print(): print cart contents and the current subtotal.List<OrderItem> toOrderItems(): convert cart items into order item snapshots.
StaffMenu
Methods
static void run(Scanner scanner, WarehouseSystem system): handle staff actions through interactive console loop.
WarehouseSystem
Fields
List<Customer> customers: in memory list of all registered customers.List<Product> products: in memory list of all available products.List<Discount> discounts: in memory list of all defined discounts.List<Order> orders: in memory record of all placed orders.List<Shipment> shipments: in memory record of all created shipments.RateTable rateTable: shipping fee tiers used for weight pricing.
Methods
void addCustomer(Customer customer): add a new customer into system registry.List<Customer> getCustomers(): return all customers currently stored in memory.Customer findCustomerById(String id): find a customer by unique textual identifier.void addProduct(Product product): add a new product into product catalog.List<Product> getProducts(): return all products currently available to customers.Product findProductById(String id): find a product by its unique identifier.void addDiscount(Discount discount): add discount and enforce active overlap rule.List<Discount> getDiscounts(): return all discounts defined in the system.void setDiscountActive(Discount target, boolean active): toggle discount status; deactivate overlapping active discounts.void addOrder(Order order): store finalized order with computed pricing details.List<Order> getOrders(): return list of all finalized customer orders.void addShipment(Shipment shipment): store shipment created for a specific order.List<Shipment> getShipments(): return list of all order shipments.RateTable getRateTable(): provide access to shipping fee rate table.Discount findApplicableDiscount(LocalDate date): return the active discount valid for the given date ornullif no discount applies.
Enumerations
ShipmentStatus
Values
CREATED, PACKED, IN_TRANSIT, OUT_FOR_DELIVERY, DELIVERED: shipment lifecycle states for tracking.
Interfaces
Payment
Methods
String currency(): currency code associated with this payment.double amount(): payment amount represented as numeric value.String summary(): short human readable description of payment.
Use Cases
This section provides a realistic, step-by-step sample runs of the application, from launch to logout. It demonstrates overlapping discounts with enforced rules, six customer transactions with mixed cash and card payments, staff shipment updates, and sample reports generated at the end.
Assuming today’s date is 2025-10-24 and the shipping rates (by weight) are:
- ≤ 2 kg: QAR 10
- > 2–5 kg: QAR 20
- > 5–10 kg: QAR 25
- > 10 kg: QAR 50
# Single-Warehouse System (QAR)
1. Staff Menu
2. Customer Menu
3. ExitStaff: Add multiple customers
Choice: 1
## Staff Menu
1. Add Customer (ID + Name)
2. List/Toggle Discounts
3. Create Discount
4. Add Product
5. Update Shipment Status
6. Reports (~15)
7. Back
Choice: 1
Customer ID: C006
Customer Name: Khalid
Added customer Khalid (ID: C006).
## Staff Menu
1. Add Customer (ID + Name)
2. List/Toggle Discounts
3. Create Discount
4. Add Product
5. Update Shipment Status
6. Reports (~15)
7. Back
Choice: 1
Customer ID: C007
Customer Name: Sara
Added customer Sara (ID: C007).Staff: Review and create discounts with overlap handling
## Staff Menu
1. Add Customer (ID + Name)
2. List/Toggle Discounts
3. Create Discount
4. Add Product
5. Update Shipment Status
6. Reports (~15)
7. Back
Choice: 2
1. Percent (P10) 10.00% [2025-10-14 to 2025-11-03] | Inactive
2. Fixed (F15) QAR 15.00 [2025-10-19 to 2025-10-27] | Inactive
3. Percent (P5) 5.00% [2025-10-23 to 2025-10-25] | Inactive
4. Fixed (F25) QAR 25.00 [2025-10-29 to 2025-11-26] | Active
5. Percent (P20) 20.00% [2025-09-24 to 2025-10-04] | Inactive
6. Fixed (F5) QAR 5.00 [2025-10-22 to 2025-11-08] | Inactive
7. Percent (P12) 12.00% [2025-10-29 to 2025-12-03] | Inactive
Enter index to toggle (or blank to skip): (press Enter to skip listing toggle)Now create a new overlapping discount and make it active to demonstrate the rule:
## Staff Menu
1. Add Customer (ID + Name)
2. List/Toggle Discounts
3. Create Discount
4. Add Product
5. Update Shipment Status
6. Reports (~15)
7. Back
Choice: 3
Type: 1) Fixed Amount 2) Percentage
Choice: 2
Code/Name: P12NOW
Start date (YYYY-MM-DD): 2025-10-24
End date (YYYY-MM-DD): 2025-11-02
Create as Active? (y/n): y
Percent (e.g., 10 for 10%): 12
Discount created. Overlap rule applied if active.List discounts again to see older overlapping actives auto-deactivated (newest stays active):
## Staff Menu
1. Add Customer (ID + Name)
2. List/Toggle Discounts
3. Create Discount
4. Add Product
5. Update Shipment Status
6. Reports (~15)
7. Back
Choice: 2
1. Percent (P10) 10.00% [2025-10-14 to 2025-11-03] | Inactive
2. Fixed (F15) QAR 15.00 [2025-10-19 to 2025-10-27] | Inactive
3. Percent (P5) 5.00% [2025-10-23 to 2025-10-25] | Inactive
4. Fixed (F25) QAR 25.00 [2025-10-29 to 2025-11-26] | Inactive
5. Percent (P20) 20.00% [2025-09-24 to 2025-10-04] | Inactive
6. Fixed (F5) QAR 5.00 [2025-10-22 to 2025-11-08] | Inactive
7. Percent (P12) 12.00% [2025-10-29 to 2025-12-03] | Inactive
8. Percent (P12NOW) 12.00% [2025-10-24 to 2025-11-02] | Active
Index to toggle (or blank to skip): (press Enter to skip listing toggle)
## Staff Menu
1. Add Customer (ID + Name)
2. List/Toggle Discounts
3. Create Discount
4. Add Product
5. Update Shipment Status
6. Reports (~15)
7. Back
Choice: 4
Category: 1) Book 2) Electronic 3) Grocery
Choice: 3
ID: G99
Name: Premium Dates Box
Price (QAR): 49.5
Weight (kg): 1.2
Stock Qty: 30
Product added: Premium Dates Box (Grocery)
## Staff Menu
1. Add Customer (ID + Name)
2. List/Toggle Discounts
3. Create Discount
4. Add Product
5. Update Shipment Status
6. Reports (~15)
7. Back
Choice: 7Customer: Transaction #1 Card
# Single-Warehouse System (QAR)
1. Staff Menu
2. Customer Menu
3. Exit
Choice: 2
Available Customer IDs:
- C001 (Ahmad)
- C002 (Mohammad)
- C003 (Nasser)
- C004 (Aisha)
- C005 (Fatimah)
- C006 (Khalid)
- C007 (Sara)
Customer ID to login: C001
## Customer Menu (ID: C001, Ahmad)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 1
- Electronic: Electronic 1 (ID E1), stock 8, price QAR 205.00
- Electronic: Electronic 2 (ID E2), stock 10, price QAR 210.00
- Electronic: Electronic 3 (ID E3), stock 10, price QAR 215.00
- Electronic: Electronic 4 (ID E4), stock 8, price QAR 220.00
- Electronic: Electronic 5 (ID E5), stock 9, price QAR 225.00
- Electronic: Electronic 6 (ID E6), stock 10, price QAR 230.00
- Electronic: Electronic 7 (ID E7), stock 11, price QAR 235.00
- Electronic: Electronic 8 (ID E8), stock 8, price QAR 240.00
- Electronic: Electronic 9 (ID E9), stock 9, price QAR 245.00
- Electronic: Electronic 10 (ID E10), stock 10, price QAR 250.00
- Electronic: Electronic 11 (ID E11), stock 11, price QAR 255.00
- Electronic: Electronic 12 (ID E12), stock 8, price QAR 260.00
- Electronic: Electronic 13 (ID E13), stock 9, price QAR 265.00
- Electronic: Electronic 14 (ID E14), stock 10, price QAR 270.00
- Electronic: Electronic 15 (ID E15), stock 11, price QAR 275.00
- Electronic: Tablet 10" (ID E99), stock 3, price QAR 899.00
- Book: Book 1 (ID B1), stock 9, price QAR 21.00
- Book: Book 2 (ID B2), stock 11, price QAR 22.00
- Book: Book 3 (ID B3), stock 11, price QAR 23.00
- Book: Book 4 (ID B4), stock 14, price QAR 24.00
- Book: Book 5 (ID B5), stock 9, price QAR 25.00
- Book: Book 6 (ID B6), stock 11, price QAR 26.00
- Book: Book 7 (ID B7), stock 12, price QAR 27.00
- Book: Book 8 (ID B8), stock 13, price QAR 28.00
- Book: Book 9 (ID B9), stock 14, price QAR 29.00
- Book: Book 10 (ID B10), stock 10, price QAR 30.00
- Book: Book 11 (ID B11), stock 11, price QAR 31.00
- Book: Book 12 (ID B12), stock 12, price QAR 32.00
- Book: Book 13 (ID B13), stock 13, price QAR 33.00
- Book: Book 14 (ID B14), stock 14, price QAR 34.00
- Book: Book 15 (ID B15), stock 10, price QAR 35.00
- Book: Algorithms Handbook (ID B99), stock 5, price QAR 120.00
- Grocery: Grocery 1 (ID G1), stock 16, price QAR 6.00
- Grocery: Grocery 2 (ID G2), stock 20, price QAR 7.00
- Grocery: Grocery 3 (ID G3), stock 19, price QAR 8.00
- Grocery: Grocery 4 (ID G4), stock 24, price QAR 9.00
- Grocery: Grocery 5 (ID G5), stock 21, price QAR 10.00
- Grocery: Grocery 6 (ID G6), stock 22, price QAR 11.00
- Grocery: Grocery 7 (ID G7), stock 23, price QAR 12.00
- Grocery: Grocery 8 (ID G8), stock 20, price QAR 13.00
- Grocery: Grocery 9 (ID G9), stock 21, price QAR 14.00
- Grocery: Grocery 10 (ID G10), stock 21, price QAR 15.00
- Grocery: Grocery 11 (ID G11), stock 23, price QAR 16.00
- Grocery: Grocery 12 (ID G12), stock 20, price QAR 17.00
- Grocery: Grocery 13 (ID G13), stock 21, price QAR 18.00
- Grocery: Grocery 14 (ID G14), stock 22, price QAR 19.00
- Grocery: Grocery 15 (ID G15), stock 23, price QAR 20.00
- Grocery: Premium Dates Box (ID G99), stock 28, price QAR 49.50
## Customer Menu (ID: C001, Ahmad)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 2
Product ID: E1
Quantity: 1
Added to cart.
## Customer Menu (ID: C001, Ahmad)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 2
Product ID: B2
Quantity: 1
Added to cart.
## Customer Menu (ID: C001, Ahmad)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 5
### Shipping Address
Street: Al Waab St 10
City: Doha
Country: Qatar
Payment method: 1) Card 2) Cash
Choice: 1
Card Holder Name: Ahmad H.
Card Number (masked): 4111-••••-••••-1111
## Checkout Summary
### Cart
1. E1 x1 | QAR 205.00
2. B2 x1 | QAR 22.00
Subtotal: QAR 227.00
Discount (Percent (P12NOW) 12.00% [2025-10-24 to 2025-11-02]): -QAR 27.24
Shipping (2.10 kg): QAR 20.00
Total: QAR 219.76
Payment: Card QAR 219.76 (Ahmad H., 4111-••••-••••-1111)
Order ID: ORD1002
Shipment: Order ORD1002 | Ahmad | Created | 2.10 kg to Al Waab St 10, Doha, Qatar
## Customer Menu (ID: C001, Ahmad)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 6Customer: Transaction #2 Cash
# Single-Warehouse System (QAR)
1. Staff Menu
2. Customer Menu
3. Exit
Choice: 2
Available Customer IDs:
- C001 (Ahmad)
- C002 (Mohammad)
- C003 (Nasser)
- C004 (Aisha)
- C005 (Fatimah)
- C006 (Khalid)
- C007 (Sara)
Customer ID to login: C002
## Customer Menu (ID: C002, Mohammad)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 2
Product ID: G10
Quantity: 3
Added to cart.
## Customer Menu (ID: C002, Mohammad)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 5
### Shipping Address
Street: Al Mansoura 7
City: Doha
Country: Qatar
Payment method: 1) Card 2) Cash
Choice: 2
## Checkout Summary
### Cart
1. G10 x3 | QAR 45.00
Subtotal: QAR 45.00
Discount (Percent (P12NOW) 12.00% [2025-10-24 to 2025-11-02]): -QAR 5.40
Shipping (2.10 kg): QAR 20.00
Total: QAR 59.60
Payment: Cash QAR 59.60
Order ID: ORD1003
Shipment: Order ORD1003 | Mohammad | Created | 2.10 kg to Al Mansoura 7, Doha, Qatar
## Customer Menu (ID: C002, Mohammad)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 6Customer: Transaction #3 Cash
# Single-Warehouse System (QAR)
1. Staff Menu
2. Customer Menu
3. Exit
Choice: 2
Available Customer IDs:
- C001 (Ahmad)
- C002 (Mohammad)
- C003 (Nasser)
- C004 (Aisha)
- C005 (Fatimah)
- C006 (Khalid)
- C007 (Sara)
Customer ID to login: C003
## Customer Menu (ID: C003, Nasser)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 2
Product ID: B5
Quantity: 1
Added to cart.
## Customer Menu (ID: C003, Nasser)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 2
Product ID: G2
Quantity: 2
Added to cart.
## Customer Menu (ID: C003, Nasser)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 5
### Shipping Address
Street: Old Airport 3
City: Doha
Country: Qatar
Payment method: 1) Card 2) Cash
Choice: 2
## Checkout Summary
### Cart
1. B5 x1 | QAR 25.00
2. G2 x2 | QAR 14.00
Subtotal: QAR 39.00
Discount (Percent (P12NOW) 12.00% [2025-10-24 to 2025-11-02]): -QAR 4.68
Shipping (1.10 kg): QAR 10.00
Total: QAR 44.32
Payment: Cash QAR 44.32
Order ID: ORD1004
Shipment: Order ORD1004 | Nasser | Created | 1.10 kg to Old Airport 3, Doha, Qatar
## Customer Menu (ID: C003, Nasser)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 6Staff: Switch to F30NOW
# Single-Warehouse System (QAR)
1. Staff Menu
2. Customer Menu
3. Exit
Choice: 1
## Staff Menu
1. Add Customer (ID + Name)
2. List/Toggle Discounts
3. Create Discount
4. Add Product
5. Update Shipment Status
6. Reports (~15)
7. Back
Choice: 3
Type: 1) Fixed Amount 2) Percentage
Choice: 1
Code/Name: F30NOW
Start date (YYYY-MM-DD): 2025-10-24
End date (YYYY-MM-DD): 2025-11-05
Create as active? (y/n): y
Fixed amount (QAR): 30
Discount created. Overlap rule applied if active.
## Staff Menu
1. Add Customer (ID + Name)
2. List/Toggle Discounts
3. Create Discount
4. Add Product
5. Update Shipment Status
6. Reports (~15)
7. Back
Choice: 7Customer: Transaction #4 Card
# Single-Warehouse System (QAR)
1. Staff Menu
2. Customer Menu
3. Exit
Choice: 2
Available Customer IDs:
- C001 (Ahmad)
- C002 (Mohammad)
- C003 (Nasser)
- C004 (Aisha)
- C005 (Fatimah)
- C006 (Khalid)
- C007 (Sara)
Customer ID to login: C004
## Customer Menu (ID: C004, Aisha)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 2
Product ID: E3
Quantity: 1
Added to cart.
## Customer Menu (ID: C004, Aisha)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 5
### Shipping Address
Street: Lusail Blvd 21
City: Lusail
Country: Qatar
Payment method: 1) Card 2) Cash
Choice: 1
Card Holder Name: Aisha M.
Card Number (masked): 5200-••••-••••-4444
## Checkout Summary
### Cart
1. E3 x1 | QAR 215.00
Subtotal: QAR 215.00
Discount (Fixed (F30NOW) QAR 30.00 [2025-10-24 to 2025-11-05]): -QAR 30.00
Shipping (1.80 kg): QAR 10.00
Total: QAR 195.00
Payment: Card QAR 195.00 (Aisha M., 5200-••••-••••-4444)
Order ID: ORD1005
Shipment: Order ORD1005 | Aisha | Created | 1.80 kg to Lusail Blvd 21, Lusail, Qatar
## Customer Menu (ID: C004, Aisha)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 6Staff: Reactivate P10
# Single-Warehouse System (QAR)
1. Staff Menu
2. Customer Menu
3. Exit
Choice: 1
## Staff Menu
1. Add Customer (ID + Name)
2. List/Toggle Discounts
3. Create Discount
4. Add Product
5. Update Shipment Status
6. Reports (~15)
7. Back
Choice: 2
1. Percent (P10) 10.00% [2025-10-14 to 2025-11-03] | Inactive
...
2. Percent (P12NOW) 12.00% [2025-10-24 to 2025-11-02] | Inactive
3. Fixed (F30NOW) QAR 30.00 [2025-10-24 to 2025-11-05] | Active
Index to toggle (or blank to skip): 1
Activated (any overlapping active discounts were set to inactive).
## Staff Menu
1. Add Customer (ID + Name)
2. List/Toggle Discounts
3. Create Discount
4. Add Product
5. Update Shipment Status
6. Reports (~15)
7. Back
Choice: 7Customer: Transaction #5 Card
# Single-Warehouse System (QAR)
1. Staff Menu
2. Customer Menu
3. Exit
Choice: 2
Available Customer IDs:
- C001 (Ahmad)
- C002 (Mohammad)
- C003 (Nasser)
- C004 (Aisha)
- C005 (Fatimah)
- C006 (Khalid)
- C007 (Sara)
Customer ID to login: C005
## Customer Menu (ID: C005, Fatimah)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 2
Product ID: G1
Quantity: 5
Added to cart.
## Customer Menu (ID: C005, Fatimah)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 2
Product ID: B3
Quantity: 2
Added to cart.
## Customer Menu (ID: C005, Fatimah)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 5
### Shipping Address
Street: Al Dafna 5
City: Doha
Country: Qatar
Payment method: 1) Card 2) Cash
Choice: 1
Card Holder Name: Fatimah S.
Card Number (masked): 4000-••••-••••-5555
## Checkout Summary
### Cart
1. G1 x5 | QAR 30.00
2. B3 x2 | QAR 46.00
Subtotal: QAR 76.00
Discount (Percent (P10) 10.00% [2025-10-14 to 2025-11-03]): -QAR 7.60
Shipping (2.25 kg): QAR 20.00
Total: QAR 88.40
Payment: Card QAR 88.40 (Fatimah S., 4000-••••-••••-5555)
Order ID: ORD1006
Shipment: Order ORD1006 | Fatimah | Created | 2.25 kg to Al Dafna 5, Doha, Qatar
## Customer Menu (ID: C005, Fatimah)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 6Customer: Transaction #6 Cash
# Single-Warehouse System (QAR)
1. Staff Menu
2. Customer Menu
3. Exit
Choice: 2
Available Customer IDs:
- C001 (Ahmad)
- C002 (Mohammad)
- C003 (Nasser)
- C004 (Aisha)
- C005 (Fatimah)
- C006 (Khalid)
- C007 (Sara)
Customer ID to login: C006
## Customer Menu (ID: C006, Khalid)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 2
Product ID: G99
Quantity: 2
Added to cart.
## Customer Menu (ID: C006, Khalid)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 5
### Shipping Address
Street: Al Markhiya 12
City: Doha
Country: Qatar
Payment method: 1) Card 2) Cash
Choice: 2
## Checkout Summary
### Cart
1. G99 x2 | QAR 99.00
Subtotal: QAR 99.00
Discount (Percent (P10) 10.00% [2025-10-14 to 2025-11-03]): -QAR 8.10
Shipping (2.40 kg): QAR 20.00
Total: QAR 109.10
Payment: Cash QAR 109.10
Order ID: ORD1007
Shipment: Order ORD1007 | Khalid | Created | 2.40 kg to Al Markhiya 12, Doha, Qatar
## Customer Menu (ID: C006, Khalid)
1. List Products (by Category)
2. Add to Cart
3. Remove from Cart
4. View Cart
5. Checkout
6. Logout
Choice: 6Staff: Manage shipments by customer
# Single-Warehouse System (QAR)
1. Staff Menu
2. Customer Menu
3. Exit
Choice: 1
## Staff Menu
1. Add Customer (ID + Name)
2. List/Toggle Discounts
3. Create Discount
4. Add Product
5. Update Shipment Status
6. Reports (~15)
7. Back
Choice: 5
1. Order ORD1002 | Ahmad | Created | 2.10 kg to Al Waab St 10, Doha, Qatar
2. Order ORD1003 | Mohammad| Created | 2.10 kg to Al Mansoura 7, Doha, Qatar
3. Order ORD1004 | Nasser | Created | 1.10 kg to Old Airport 3, Doha, Qatar
4. Order ORD1005 | Aisha | Created | 1.80 kg to Lusail Blvd 21, Lusail, Qatar
5. Order ORD1006 | Fatimah | Created | 2.25 kg to Al Dafna 5, Doha, Qatar
Shipment index: 1
Status:
1. Created
2. Packed
3. In transit
4. Out for delivery
5. Delivered
New status index: 5
Updated: Order ORD1002 | Ahmad | Delivered | 2.10 kg to Al Waab St 10, Doha, Qatar
## Staff Menu
1. Add Customer (ID + Name)
2. List/Toggle Discounts
3. Create Discount
4. Add Product
5. Update Shipment Status
6. Reports (~15)
7. Back
Choice: 5
1. Order ORD1003 | Mohammad| Created | 2.10 kg to Al Mansoura 7, Doha, Qatar
2. Order ORD1004 | Nasser | Created | 1.10 kg to Old Airport 3, Doha, Qatar
3. Order ORD1005 | Aisha | Created | 1.80 kg to Lusail Blvd 21, Lusail, Qatar
4. Order ORD1006 | Fatimah | Created | 2.25 kg to Al Dafna 5, Doha, Qatar
Shipment index: 4
Status:
1. Created
2. Packed
3. In transit
4. Out for delivery
5. Delivered
New status index: 5
Updated: Order ORD1006 | Fatimah | Delivered | 2.25 kg to Al Dafna 5, Doha, Qatar
## Staff Menu
1. Add Customer (ID + Name)
2. List/Toggle Discounts
3. Create Discount
4. Add Product
5. Update Shipment Status
6. Reports (~15)
7. Back
Choice: 7
# Single-Warehouse System (QAR)
1. Staff Menu
2. Customer Menu
3. Exit
Choice: 3
Goodbye.Staff: Reports
# Single-Warehouse System (QAR)
1. Staff Menu
2. Customer Menu
3. Exit
Choice: 1
## Staff Menu
1. Add Customer (ID + Name)
2. List/Toggle Discounts
3. Create Discount
4. Add Product
5. Update Shipment Status
6. Reports (~15)
7. Back
Choice: 6
1. All Discounts
2. Active Discounts (today)
3. Products by Category
4. Low Stock (≤ threshold)
5. Out of Stock
6. Inventory Valuation (QAR)
7. Orders Today (YYYY-MM-DD)
8. Sales by Customer (QAR)
9. Shipments by Status
10. Shipments in Progress
11. Simple Top-Selling (counts)
12. Total Revenue (QAR, all time)
13. Payments Summary (from Orders)
14. Discount Usage
15. Active Discount Overlaps (today)[1] All Discounts:
- Percent (P10) 10.00% [2025-10-14 to 2025-11-03] | Inactive
- Fixed (F15) QAR 15.00 [2025-10-19 to 2025-10-27] | Inactive
- Percent (P5) 5.00% [2025-10-23 to 2025-10-25] | Inactive
- Fixed (F25) QAR 25.00 [2025-10-29 to 2025-11-26] | Inactive
- Percent (P20) 20.00% [2025-09-24 to 2025-10-04] | Inactive
- Percent (P12) 12.00% [2025-10-29 to 2025-12-03] | Inactive
- Percent (P12NOW) 12.00% [2025-10-24 to 2025-11-02] | Inactive
- Fixed (F30NOW) QAR 30.00 [2025-10-24 to 2025-11-05] | Inactive
[2] Active Discounts (today 2025-10-24):
- Percent (P10) 10.00% [2025-10-14 to 2025-11-03]
[3] Products by Category:
- Electronic: Electronic 1 (ID E1), stock 8, price QAR 205.00
- Electronic: Electronic 2 (ID E2), stock 10, price QAR 210.00
- Electronic: Electronic 3 (ID E3), stock 10, price QAR 215.00
- Electronic: Electronic 4 (ID E4), stock 8, price QAR 220.00
- Electronic: Electronic 5 (ID E5), stock 9, price QAR 225.00
- Electronic: Electronic 6 (ID E6), stock 10, price QAR 230.00
- Electronic: Electronic 7 (ID E7), stock 11, price QAR 235.00
- Electronic: Electronic 8 (ID E8), stock 8, price QAR 240.00
- Electronic: Electronic 9 (ID E9), stock 9, price QAR 245.00
- Electronic: Electronic 10 (ID E10), stock 10, price QAR 250.00
- Electronic: Electronic 11 (ID E11), stock 11, price QAR 255.00
- Electronic: Electronic 12 (ID E12), stock 8, price QAR 260.00
- Electronic: Electronic 13 (ID E13), stock 9, price QAR 265.00
- Electronic: Electronic 14 (ID E14), stock 10, price QAR 270.00
- Electronic: Electronic 15 (ID E15), stock 11, price QAR 275.00
- Electronic: Tablet 10" (ID E99), stock 3, price QAR 899.00
- Book: Book 1 (ID B1), stock 9, price QAR 21.00
- Book: Book 2 (ID B2), stock 11, price QAR 22.00
- Book: Book 3 (ID B3), stock 11, price QAR 23.00
- Book: Book 4 (ID B4), stock 14, price QAR 24.00
- Book: Book 5 (ID B5), stock 9, price QAR 25.00
- Book: Book 6 (ID B6), stock 11, price QAR 26.00
- Book: Book 7 (ID B7), stock 12, price QAR 27.00
- Book: Book 8 (ID B8), stock 13, price QAR 28.00
- Book: Book 9 (ID B9), stock 14, price QAR 29.00
- Book: Book 10 (ID B10), stock 10, price QAR 30.00
- Book: Book 11 (ID B11), stock 11, price QAR 31.00
- Book: Book 12 (ID B12), stock 12, price QAR 32.00
- Book: Book 13 (ID B13), stock 13, price QAR 33.00
- Book: Book 14 (ID B14), stock 14, price QAR 34.00
- Book: Book 15 (ID B15), stock 10, price QAR 35.00
- Book: Algorithms Handbook (ID B99), stock 5, price QAR 120.00
- Grocery: Grocery 1 (ID G1), stock 16, price QAR 6.00
- Grocery: Grocery 2 (ID G2), stock 20, price QAR 7.00
- Grocery: Grocery 3 (ID G3), stock 19, price QAR 8.00
- Grocery: Grocery 4 (ID G4), stock 24, price QAR 9.00
- Grocery: Grocery 5 (ID G5), stock 21, price QAR 10.00
- Grocery: Grocery 6 (ID G6), stock 22, price QAR 11.00
- Grocery: Grocery 7 (ID G7), stock 23, price QAR 12.00
- Grocery: Grocery 8 (ID G8), stock 20, price QAR 13.00
- Grocery: Grocery 9 (ID G9), stock 21, price QAR 14.00
- Grocery: Grocery 10 (ID G10), stock 21, price QAR 15.00
- Grocery: Grocery 11 (ID G11), stock 23, price QAR 16.00
- Grocery: Grocery 12 (ID G12), stock 20, price QAR 17.00
- Grocery: Grocery 13 (ID G13), stock 21, price QAR 18.00
- Grocery: Grocery 14 (ID G14), stock 22, price QAR 19.00
- Grocery: Grocery 15 (ID G15), stock 23, price QAR 20.00
- Grocery: Premium Dates Box (ID G99), stock 28, price QAR 49.50
[4] Low Stock (≤ 5):
- Algorithms Handbook (B99) stock 5
- Tablet 10" (E99) stock 3
[5] Out of Stock:
None.
[6] Inventory Valuation (QAR):
Total: QAR (computed by system based on current stock)
[7] Orders Today (2025-10-24):
- ORD1002 | Ahmad | QAR 219.76
- ORD1003 | Mohammad| QAR 59.60
- ORD1004 | Nasser | QAR 44.32
- ORD1005 | Aisha | QAR 195.00
- ORD1006 | Fatimah | QAR 88.40
- ORD1007 | Khalid | QAR 109.10
[8] Sales by Customer (QAR):
- Ahmad: QAR 219.76
- Mohammad:QAR 59.60
- Nasser: QAR 44.32
- Aisha: QAR 195.00
- Fatimah: QAR 88.40
- Khalid: QAR 109.10
[9] Shipments by Status:
- Order ORD1002 | Ahmad | Delivered | 2.10 kg to Al Waab St 10, Doha, Qatar
- Order ORD1003 | Mohammad| Out for delivery | 2.10 kg to Al Mansoura 7, Doha, Qatar
- Order ORD1004 | Nasser | Created | 1.10 kg to Old Airport 3, Doha, Qatar
- Order ORD1005 | Aisha | In transit | 1.80 kg to Lusail Blvd 21, Lusail, Qatar
- Order ORD1006 | Fatimah | Delivered | 2.25 kg to Al Dafna 5, Doha, Qatar
- Order ORD1007 | Khalid | Packed | 2.40 kg to Al Markhiya 12, Doha, Qatar
[10] Shipments in Progress:
- ORD1003 | Mohammad | Out for delivery | 2.10 kg to Al Mansoura 7, Doha, Qatar
- ORD1004 | Nasser | Created | 1.10 kg to Old Airport 3, Doha, Qatar
- Order ORD1005 | Aisha | In transit | 1.80 kg to Lusail Blvd 21, Lusail, Qatar
- ORD1007 | Khalid | Packed | 2.40 kg to Al Markhiya 12, Doha, Qatar
[11] Simple Top-Selling (counts):
- Grocery 1 (G1): 5 units
- Grocery 10 (G10): 3 units
- Premium Dates Box (G99): 2 units
- Book 3 (B3): 2 units
- Grocery 2 (G2): 2 units
- Electronic 1 (E1): 1 unit
- Electronic 3 (E3): 1 unit
- Book 2 (B2): 1 unit
- Book 5 (B5): 1 unit
[12] Total Revenue (QAR, all time):
Total: QAR 716.18
[13] Payments Summary (from Orders):
Collected: QAR 716.18
(mix: card for Ahmad, Aisha, Fatimah; cash for Mohammad, Nasser, Khalid)
[14] Discount Usage:
- P10: times 2, total discount QAR 17.50
- P12NOW: times 3, total discount QAR 37.32
- F30NOW: times 1, total discount QAR 30.00
[15] Active Discount Overlaps (today 2025-10-24):
- Percent (P10) 10.00% [2025-10-14 to 2025-11-03]Guidelines
- This is a collective teamwork of 3–4 members. No freeloading.
- Submissions later than the deadline will not be accepted.
- Markdown is the only allowed format for documenting the project.
- GitHub is the only allowed platform for submitting the project.
Collaboration
Commit and push frequently, using descriptive messages with concise summaries, to document your individual contributions to the project.
- Use only fast-forward merging to minimize conflicts.
- You can use GitHub issues (opens in a new tab) to track issues and distribute the workload.
- You can use a GitHub project (opens in a new tab) to plan and track the implementation.
- You can use a GitHub wiki (opens in a new tab) to document the project.
Data Persistence
All application data stored in the program’s list collections must be persisted to plain-text files when the user chooses to exit/logout from the main menu. Conversely, on program start, the application must load these plain-text files and repopulate the corresponding lists before any user interaction.
Error Handling
Include proper error handling and user-friendly error messages to address potential issues like data loading errors and invalid user input. Use exceptions to handle as many edges cases as possible, such as when the user enters a letter where a digit is expected.
Documentation
Every source file must include a Javadoc header listing the author(s), the creation date, and a descriptive summary.
Testing
Test and validate the functionality of your system. Include screenshots and brief descriptions of the tests in your report.
Codebase
All source files must adhere to proper formatting guidelines, and names, whether they belong to a variable, parameter, method, enumeration, class, or interface, must be descriptive. Use the following naming conventions:
PascalCasefor class / interface / enumeration names.CONSTANT_CASEfor constant names.camelCasefor variable, field, and method names.
The following structure should be used to organize the codebase. There is no need to create additional top-level directories/files, but more directories/files can be created under data and screenshots, if needed.
collections.txt
test-1.pngtest-2.pngtest-3.pngtest-4.pngtest-5.pngtest-6.pngtest-7.pngtest-8.pngtest-9.png...
Address.javaApp.javaBookProduct.javaCardPayment.javaCartItem.javaCashPayment.javaCustomer.javaCustomerMenu.javaDiscount.javaElectronicProduct.javaFixedAmountDiscount.javaGroceryProduct.javaOrder.javaOrderIdGenerator.javaOrderItem.javaPayment.javaPercentageDiscount.javaProduct.javaProductListView.javaRateTable.javaReportService.javaSeedData.javaShipment.javaShipmentStatus.javaShoppingCart.javaStaffMenu.javaWarehouseSystem.java
readme.md
Reports
All reports must be authored in Markdown (opens in a new tab). No other format will be accepted.
Follow this tutorial (opens in a new tab) for a quick introduction to Markdown.
Team Report
The team project report must include team members’ names and emails, an overview of the project’s design and implementation, a list of the issues and challenges that were encountered and how they were resolved/overcome, and screenshots of input/output for test cases covering key aspects of the project; each screenshot should have a brief description.
# Team Report
## Team
- Dane Doe <`[email protected]`>
- Sane Doe <`[email protected]`>
- Zane Doe <`[email protected]`>
## Overview
Overview of the project and its design and implementation, including
classes, interfaces, methods, enumerations, etc.
## Issues + Challenges
1. Issue 1
Resolved using ...
2. Issue 2
Resolved using ...
3. Challenge 1
Overcame by ...
## Tests
### Requirement 1

Brief description of the test.
### Requirement 2

Brief description of the test.
...Fill the readme.md team project report and push it to the team
repository.
Individual Report
Each team member must submit an individual project report. This report should describe their timestamped contributions to the project and elaborate on the advantages and disadvantages of working in a team. This is a personal report that is not shared among team members.
# Individual Report
## Worklog
### 2025-11-02
- Designed an interface for ...
### 2025-11-08
- Fixed an error related to ...
### 2025-11-17
- Had a team meeting to discuss ...
### 2025-11-21
- Added a method for ...
### 2025-11-25
- Tested the implementation of ...
## Advantages
1. Advantage 1
2. Advantage 2
...
## Disadvantages
1. Disadvantage 1
2. Disadvantage 2
...Fill the readme.md individual project report and push it to your
personal repository.
Evaluation
The project evaluation session will include a live demonstration of the system.
Rubric
| Activity | Points |
|---|---|
| Code completeness | +60% |
| Implementation quality | +20% |
| Team report | +10% |
| Individual report | +10% |
| No repository | -100% |
| No report | -100% |
| Plagiarism | -100% |
| Total | 7 |
Footnotes
-
Student Code of Conduct (opens in a new tab) / Article (6) — لائحة السلوك الطلابي (opens in a new tab) \ المادة (٦). ↩