An advanced C++ console-based Enterprise Inventory Management System designed to simulate large-scale warehouse operations, handling diverse product categories with distinct storage, risk assessment, and expiry requirements[cite: 3].
This project demonstrates core Object-Oriented Programming (OOP) concepts including a multi-level inheritance hierarchy, dynamic polymorphism, generic templated logging, manual dynamic memory management (Rule of Three), and complex inter-class relationships[cite: 3].
- Deep Inheritance Hierarchy (3+ Levels): Categorizes items into specialized sub-types such as
FragileElectronicsorPerishableGrocery[cite: 3]. - Dynamic Polymorphism: Virtual dispatch for real-time inventory operations like
calculateRisk(),displayStatus(), andapplyDiscount()across 10+ distinct classes[cite: 3]. - Risk & Expiry Management: Automated evaluation for high-risk fragile shipments and expired grocery stock[cite: 3].
- Supplier & Stock Integration: Link products to specific suppliers, order restocks, and generate invoices[cite: 3].
- Advanced Operator Overloading: Custom behavior for subscript
[](aisle shelf access),+(stock merging), and<<(stream reports)[cite: 3]. - Generic Audit Logging (
TransactionLog<T>): Template class to record actions and generate audit trails for any entity type (Product,Supplier, etc.)[cite: 3]. - Clean Architecture & Memory Safety: Strict encapsulation, zero memory leaks through proper memory management (Rule of Three), and complete header/source code separation (
.hand.cpp)[cite: 3].
Product(Abstract Base Class): Root class containing common attributes (productID,price,quantity) and pure virtual functions (displayStatus(),calculateValue())[cite: 3].ElectronicProduct: Inherits fromProduct(Tech base withvoltage,warranty)[cite: 3].FragileElectronics: Inherits fromElectronicProduct(Specialized tech withfragilityRating,calculateShippingRisk())[cite: 3].
GroceryProduct: Inherits fromProduct(Food base withcalories,isHalal)[cite: 3].PerishableGrocery: Inherits fromGroceryProduct(High-maintenance food withexpiryDate,checkExpiry())[cite: 3].NonPerishable: Inherits fromGroceryProduct(Shelf-stable food withshelfLifeYears)[cite: 3].
ClothingProduct: Inherits fromProduct(Apparel base withsize,fabric)[cite: 3].Supplier: Associated withProductto track supplier contracts and process restock orders[cite: 3].InventorySection: ComposesProduct*lists to manage stock inside aisles (addStock(),sortByID())[cite: 3].Warehouse: AggregatesInventorySectionobjects to manage global inventory stats and locate shortages[cite: 3].TransactionLog<T>: Templated audit logger tracking warehouse events generics[cite: 3].
| Concept | Implementation Details |
|---|---|
| Deep Inheritance | 3-level branching hierarchy (Product ➔ GroceryProduct ➔ PerishableGrocery)[cite: 3] |
| Polymorphism | Overridden virtual functions dispatched at runtime via base class pointers (Product*)[cite: 3] |
| Encapsulation | Protected/private member variables with strict validation setters[cite: 3] |
| Memory Management | Custom destructors, copy constructors, and copy assignment operators (Rule of Three)[cite: 3] |
| Operator Overloading | Overloaded [], +, ==, and << operators for intuitive operations[cite: 3] |
| Templates | Generic TransactionLog<T> class for tracking multi-entity audit trails[cite: 3] |
| Relationships | Explicit modeling of Composition, Aggregation, and Association[cite: 3] |
- Course: Object-Oriented Programming (OOP) Lab[cite: 3]
- Institution: University of Engineering and Technology (UET)
- Muhammad Arslan
- Muhammad Umar
- Abdullah Abid
- Mam Zoha