This project is a console-based Inventory Management System built using C++ and Object-Oriented Programming (OOP). It helps manage products, stock levels, prices, and availability while using a clean class structure and file handling for data persistence.
- Add, remove, and search products
- Update stock quantities
- Track pricing and availability
- View complete product list
- Persistent storage using text files
- Simple menu-driven console interface
- Classes & Objects: Product, Inventory
- Encapsulation: Private attributes + getters/setters
- Inheritance: Optional subclasses (e.g., PerishableProduct)
- Polymorphism: Overridable display/calculation functions
- File Handling: Read/write inventory data from
.txtfiles
/src
|-- main.cpp
|-- Product.h / Product.cpp
|-- Inventory.h / Inventory.cpp
/data
|-- products.txt
README.md
g++ src/*.cpp -o inventory_app
./inventory_app
- C++11 or newer
- Any standard compiler (G++, Clang, MSVC)
- Install a C++ compiler (recommended: G++).
- Download or clone the project folder.
- Ensure the
datadirectory exists with read/write permissions. - Compile using the build command above.
- 1. Add Product – Enter ID, name, price, and quantity.
- 2. Remove Product – Remove using product ID.
- 3. Search Product – Search by ID or keyword.
- 4. Update Stock – Increase or decrease quantity.
- 5. View All Products – Display all items.
101|USB Cable|150|47
102|Notebook|40|120
Add product:
Enter Product ID: 301
Enter Name: Bluetooth Speaker
Enter Price: 1200
Enter Quantity: 10
Update stock:
Enter Product ID: 301
Enter New Quantity: 15
- Admin authentication
- Sales reporting and analytics
- Category-based product filtering
- Expiry tracking for perishable items
- GUI or web-based version
- Fork the project.
- Create a feature branch.
- Commit clean, structured code.
- Open a pull request.
For any issues or suggestions, feel free to update the README or improve the project.