This project implements an Inventory Management System using a Binary Search Tree (BST) in C++. Designed for a warehouse setting, the BST stores items based on unique item IDs, allowing efficient stock management, price queries, and bulk data handling.
The project consists of four main tasks, each addressing crucial aspects of warehouse inventory management using BST based on AVL-Tree conscept to keep the tree in binary search tree format with Balance Factor = [-1,0,1].
Each node in the BST represents an item with attributes including:
- item_id: Unique integer (key for BST).
- item_name: Product name (string).
- item_description: Description of the item.
- quantity: Units available in stock.
- price: Price per unit.
- Insert an Item: Adds a new item to the inventory, maintaining BST structure using
item_id
. - Search for an Item: Retrieves item details using
item_id
. - Delete an Item: Removes an item from the inventory based on
item_id
. - Update Item Information: Allows updating the quantity and price of an item by searching via
item_id
.
- Check Stock Availability: Verifies if an item is in stock and returns its quantity.
- Low Stock Alert: Lists items with fewer than 3 units, enabling proactive restocking.
- Restock Item: Allows restocking an item by adding a specified quantity to the existing amount.
- Find Items within a Price Range: Returns items within a specified price range
[min_price, max_price]
. - Find the Cheapest Item: Finds and returns the item with the lowest price.
- Find the Most Expensive Item: Finds and returns the item with the highest price.
The system supports bulk data operations from a CSV file, with each entry including item information.
- Existing Items: If the item exists, updates attributes if values differ.
- New Items: Adds new items if not found in the tree.
- Programming Language: C++
- Data Structure: Binary Search Tree (BST)
- Clone the repository:
git clone https://github.com/yourusername/InventoryManagementBST.git
- Command for execution:
g++ 23i-2014_B.cpp [To compile] ./a.out or ./a.exe [To Execute]
If you encounter any errors, bugs, or have suggestions for improvements, feel free to reach out to me.
You can contact me via email at: [email protected]
I’m open to collaborative projects in cybersecurity, programming, or knowledge-sharing initiatives. Feel free to reach out if you’d like to discuss ideas or explore ways we can work together.
- LinkedIn: linkedin.com/in/abdul-ahad-988305286
- Email: [email protected]
Looking forward to connecting!