Skip to content

0xyoussef404/InventoryManagementSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Inventory Management System


📖 Overview

This project is a desktop-based Inventory Management System developed using Java Swing.
The system is designed to manage:

  • Products
  • Stock Levels
  • Suppliers
  • Orders
  • Reports

The application follows a modular and scalable architecture and applies several object-oriented design patterns to ensure maintainability, flexibility, and code reuse.


🏗️ System Architecture

The system is divided into the following main layers:

1️⃣ UI Layer

Provides graphical user interfaces using Java Swing components.

Main Components:

  • MainFrame – Main application window with navigation tabs.
  • ProductPanel – Add and list products.
  • OrderPanel – Place and view orders.
  • SupplierPanel – Manage supplier data.
  • ReportPanel – Generate and display reports.

2️⃣ Model Layer

Represents real-world entities as Java classes:

  • Product
  • Order
  • Supplier
    • LocalSupplier
    • InternationalSupplier

3️⃣ Manager Layer

Singleton classes responsible for managing system data:

  • StockManager
  • OrderManager
  • SupplierManager

4️⃣ Factory Layer

Handles object creation logic:

  • ProductFactory
  • SupplierFactory

5️⃣ Report Module

Responsible for generating dynamic and formatted reports.

  • Uses Decorator Pattern
  • Uses Strategy Pattern for report generation

6️⃣ Observer Module

Handles stock alerts and notifications:

  • Notifies when stock levels fall below a defined threshold.

🧩 Design Patterns Used

1️⃣ Singleton Pattern

Purpose:
Ensures that only one instance of a class exists and provides global access.

Used In:

  • StockManager
  • OrderManager
  • SupplierManager
  • ReportGenerator

2️⃣ Factory Pattern

Purpose:
Creates objects without exposing the creation logic.

Used In:

  • ProductFactory
    • Electronics
    • Furniture
    • Groceries
  • SupplierFactory
    • Local
    • International

3️⃣ Adapter Pattern

Purpose:
Allows incompatible interfaces to work together.

Used In:

  • ProductAdapter – Adapts product data to report format.
  • OrderAdapter – Adapts order data to report format.

Common Interface:

  • ReportableAdapter

4️⃣ Decorator Pattern

Purpose:
Adds responsibilities to objects dynamically.

Used In:

  • HeaderDecorator – Adds title and date to reports.
  • FooterDecorator – Adds footer/end tag to reports.

5️⃣ Observer Pattern

Purpose:
Defines a one-to-many dependency between objects.

Used In:

  • StockManager notifies observers when stock is low.
  • LowStockNotifier implements StockObserver to receive alerts.

🔍 Component Descriptions

UI Components

  • MainFrame: Hosts navigation tabs for all modules.
  • ProductPanel: Adds products and displays them in a table.
  • OrderPanel: Creates orders and validates inventory levels.
  • SupplierPanel: Manages supplier information.
  • ReportPanel: Generates inventory and order reports.

Manager Classes

  • StockManager: Manages inventory and observers.
  • OrderManager: Stores all orders.
  • SupplierManager: Manages suppliers.
  • ReportGenerator: Generates formatted reports using adapters.

Factories

  • ProductFactory: Dynamically creates product objects.
  • SupplierFactory: Creates supplier instances based on type.

Report System

Strategies:

  • FullInventoryReportStrategy
  • LowStockReportStrategy

Decorators:

  • HeaderDecorator
  • FooterDecorator

Adapters:

  • ProductAdapter
  • OrderAdapter

Observer System

  • StockObserver interface with onStockLow(Product) method.
  • LowStockNotifier prints warnings when stock drops below threshold.

🛠️ Technologies Used

  • Java
  • Java Swing
  • Object-Oriented Programming (OOP)
  • Design Patterns

✅ Conclusion

This Inventory Management System demonstrates the practical application of multiple design patterns in a real-world Java desktop application, providing a clean, extensible, and maintainable codebase.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages