Simple inventory management system

154 views 8:49 am 0 Comments October 9, 2023
You are tasked with building a simple inventory management system for a small retail store. The store sells various products, and they need a program to keep track of their inventory, calculate sales, and generate reports. Requirements: Create a class called Product to represent each product in the store. Each product should have the following attributes: Product ID (a unique identifier for each product) Product Name Price Quantity in Stock Create a class called Inventory to manage the store’s inventory. This class should have the following methods: addProduct(Product product): Add a new product to the inventory. sellProduct(int productID, int quantity): Record a sale of a specific quantity of a product. getTotalSales(): Calculate and return the total sales value. generateInventoryReport(): Generate and print a report with the current inventory details, including product ID, name, price, quantity in stock, and total sales for each product. Create a Main class to demonstrate the functionality of the inventory management system. You should be able to: Add products to the inventory. Sell products and update the inventory. Print the inventory report.

Tags: , , , , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *