All work
06 / JAVA & ENTERPRISE SYSTEMS

Data structures with a business purpose.

A Java desktop application that makes FIFO order processing and LIFO transaction undo tangible.

01 / THE QUESTION

What happens to inventory when an order changes?

An order system needs predictable processing and a way to correct the most recent inventory change. These business rules are a concrete use case for queues and stacks.

Build a small desktop warehouse dashboard that connects pending sales orders, inventory changes, and transaction history through explicit data structures.

02 / THE APPROACH
01

Separate records from behavior

Used an ERPRecord interface with SalesOrder and InventoryTransaction classes. ERPService manages the inventory, order queue, undo stack, and activity log independently of the Swing interface.

02

Process and reverse

Implemented a generic linked FIFO queue for pending orders and a generic linked LIFO stack for processed transactions. Processing reduces inventory; undo restores the last transaction’s inventory change.

03

Make the state visible

Built a Swing dashboard showing inventory, queue, stack, and a running activity log, with controls to load sample orders, process the next order, undo, and reset.

TRY THE BUSINESS RULE

First in. First out.
Last change. First undone.

An interactive explanation using the Java project’s sample orders. Processing updates inventory; undo restores stock without re-queuing the order.

INVENTORY
Laptop25
Mouse80
Keyboard55
PENDING / FIFO
SO-10012 × Laptop
SO-10025 × Mouse
SO-10033 × Keyboard
SO-10041 × Laptop
UNDO STACK / LIFO

No processed transactions.

Four sample orders are ready. Process the first order to begin.

Inside the original application.

Original Java Swing MiniERP dashboard: initial inventory.
Actual screenshot from the submitted Java application.
03 / THE OUTCOME

What the work delivers.

Runnable Java source and a documented desktop workflow. The original project screenshots below show the application’s actual state transitions.

THE TAKEAWAY

Separating the service layer from the interface makes the business rules easier to follow. Undoing a stock change and re-queuing an order are distinct operations; this application implements the former.

Project scopeAn in-memory coursework application with sample data. It has no persistence, multi-user access control, or production warehouse integration. The web interaction is an explanatory companion to the Java application.

KEEP EXPLORING

Customer Shopping Behavior Analysis