Skip to content
Grocery warehouse management system
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Build a Grocery Warehouse Management Systems to mange customers, orders, and inventory levels.

What you must know in order to complete the project

  1. Classes with instance variable and methods
  2. How to implement a design using OO Concepts such as: Polymorphism, Encapsulation, and Composition
  3. Abstract classes
  4. Interfaces
  5. Error Handling
  6. GUI Design and Layout Managers
  7. Swing event handling (ActionListeners)
  8. Collections
  9. File I/O

How to use

The build process creates Warehouse.jar in the root folder. You can run this by double-clicking it!


Suitable for advanced students. Would be 20-40 hours of work when material is covered well.

The specification is quite verbose and some choices are forced, this makes it difficult to do things in a natural way. So, this makes it a bit easier in some ways (less decisions), but harder in other ways!


The first step is to clarify the specifications from the assignment document ( /design/warehouse assignment.doc).

  1. There are two types of Customer:
  • A) A Retailer has a line of credit with the grocery warehouse against which they can purchase their orders - any balance owning on their line of credit from the Retailer’s last order must be paid off before a new order can be placed.

  • B) Outlet Members must pay immediately for the items they are purchasing

    • there are no fixed limits on the amount of stock that is available for purchase to Outlet Members
    • Outlet Members can get reward points for each for each $10 spent in a single transaction. The points earned from a transaction are calculated based on the total purchase amount before any applicable discount is applied.
    • Discounts are given depending on the reward points accrued:
Total Reward points accrued % discount
0-199 No discount
200-499 2%
500-999 5%
1000+ 10%
  1. Implement a Customer abstract class with:
  • A) properties that are common to both types of customer: customer id, name, address, phone number
  • B) an (abstract) method for adding a sale to the customer’s “account”.
  1. Implement a Retailer subclass with:
  • A) an additional property representing their current credit balance (amount owing from their last order)
  • B) override the abstract method for adding a sale in the Retailer class - this method should check to see if there is any amount owing from the previous order before adding the new order total to the Retailer’s credit balance – if there is still an outstanding credit balance from the previous order then an exception containing a suitable error message should be thrown (and caught in the application class).
  • C) a new method which allows the credit balance (amount owing) for the retailer to be reset to zero (0) to reflect that payment of any amount owing from the Retailer’s last order has been made.
  1. Implement an OutletMember subclass with:
  • A) an additional property representing the total reward points accrued.

  • B) override the abstract method for adding a sale in the OutletMember class - this method will involve adding reward points to their accrued reward point total based on the total sale amount of their current transaction – if the OutletMember’s reward point total reaches the a higher discount level after the reward points for the current transaction have been added the an exception containing a suitable congratulatory message should be thrown (and caught by the application class).

  • C) You should also implement a method for retrieving the customer’s current discount percentage (based on their accrued reward point total).

The input text files that are used to save and load the data can be found in the folder: /files .


See folder: /design

Class Diagram

warehouse class diagram

Screen Design

Use JTabbedPane to separate functionality.

As the layout is coded manually, the simplest layout managers are used: flow; border, and box.

Customer Management

warehouse screenshot

Retailer Order

warehouse screenshot retail order

Warehouse Management

warehouse screenshot retail order


See folder: /doc

You can’t perform that action at this time.