- Create a storage system for available items using a dynamically allocated array (in C). In C++, use a vector for convenience.
- The warehouse can store up to 100 items, each with the following data:
- Product name
- Product code
- Quantity
- Price per item
- A unique code for each product, automatically generated.
- Use a MENU system to serve as the interface for the system:
- Display the items in stock (the system will notify you of items with low stock levels (< 20 units)).
- Automatically calculate the total value of goods in the warehouse.
- Export items:
- You will need to enter the product code and the quantity to export. The system will then prompt you to input export details for each item (product code, quantity).
- If the requested export quantity exceeds the available stock, the system will display an error message and prompt you to re-enter the data.
- After exporting, the warehouse information will be automatically updated for the user.
- Choose whether to add a new product or restock an existing product.
- For restocking, simply enter the product code, and the system will display the item's current information, allowing you to input the additional quantity.
- For adding a new product, you will need to input all required details.
This feature facilitates inventory checking:
- Sort by price (ascending or descending).
- Sort by quantity (ascending or descending).
- Use a menu to select sorting order.
- When you enter a product code, the system will display the product's name, quantity, and price.
- If the code is invalid, it will display a "Product not found" message.
- All changes (imports, exports, or modifications) are logged in a file and can be viewed using this feature.
- Enter the product code of the item to be deleted, and it will be removed from the inventory.
- Enter the product code for the item you want to update and input the new price.
RETURN 0;