This Inventory Management System is designed to efficiently track and manage inventory for a store or warehouse. The system includes classes for Product, Category, Supplier, and Invoice, and provides methods for adding, updating, and querying inventory items. It features a command-line interface for user interaction.
-
Product Management
- Add new products
- Update existing products
- Query product details
- Remove products
- Display all products
- Buy products and generate invoices
- Display products by category
-
Category Management
- Add new categories
- Update existing categories
- Query category details
- Display all categories
- Remove categories
-
Supplier Management
- Add new suppliers
- Update existing suppliers
- Query supplier details
- Display all suppliers
- Remove suppliers
Represents a product in the inventory.
name
: Name of the productid
: Unique identifier for the productquantity
: Quantity of the product availableprice
: Price of the productcategory
: Category to which the product belongs
display()
: Displays the details of the product
Represents a category of products.
name
: Name of the categorydescription
: Description of the category
display()
: Displays the details of the category
Represents a supplier for the products.
name
: Name of the suppliercontactInfo
: Contact information of the supplier
display()
: Displays the details of the supplier
Represents an invoice generated when products are purchased.
products
: List of purchased productsquantities
: List of quantities for the purchased productstotal
: Total amount for the invoice
addItem(Product &product, int quantity)
: Adds an item to the invoicedisplay()
: Displays the details of the invoice
Manages the overall inventory, including products, categories, and suppliers.
addSampleProducts()
: Adds sample products to the inventoryaddSampleCategories()
: Adds sample categories to the inventoryaddSampleSuppliers()
: Adds sample suppliers to the inventoryaddProduct(Product &product)
: Adds a new product to the inventoryupdateProduct(int id, Product &updatedProduct)
: Updates an existing product in the inventoryqueryProduct(int id)
: Queries a product by its IDremoveProduct(int id)
: Removes a product by its IDbuyProduct(string name, int quantity)
: Buys a product and generates an invoicedisplayAllProducts()
: Displays all products in the inventoryaddCategory(Category &category)
: Adds a new category to the inventoryupdateCategory(string name, Category &updatedCategory)
: Updates an existing categoryqueryCategory(string name)
: Queries a category by its nameremoveCategory(string name)
: Removes a category by its namedisplayAllCategories()
: Displays all categories in the inventorydisplayProductByCategory(string &category)
: Displays products by their categoryaddSupplier(Supplier &supplier)
: Adds a new supplier to the inventoryupdateSupplier(string name, Supplier &updatedSupplier)
: Updates an existing supplierquerySupplier(string name)
: Queries a supplier by its nameremoveSupplier(string name)
: Removes a supplier by its namedisplayAllSuppliers()
: Displays all suppliers in the inventory
To run the Inventory Management System, simply compile and execute the main
function. You will be presented with a command-line interface to interact with the system.
Add a Product
Enter product ID: 1
Enter the Category name: Electronics
Enter product quantity: 10
Enter product price: 199.99
This project is licensed under the MIT License. See the LICENSE file for details.