Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Objective To create a console - based inventory management system that tracks the stock of items in a store. This system will use various types
Objective
To create a consolebased inventory management system that tracks the stock of items in a store. This system will use various types of functions, userdefined data types, and arrays.
Requirements
UserDefined Data Types
Define a struct named Item that contains the following fields: idintegernamestringpricefloat and quantityinteger
Arrays
Create an array of Item structs named inventory that will store the stock of the store.
Functions
Implement the following functions:
addItemItem inventory int &size: Accepts the inventory array and a reference to the current number of items. This function allows the user to add a new item to the inventory.
listItemsconst Item inventory int size: Accepts the inventory array and the current number of items, then prints all the items in the inventory.
updateQuantityItem inventory int size: Accepts the inventory array and the current number of items, then allows the user to update the quantity of an item.
calculateTotalValueconst Item inventory int size: Returns the total value of all the items in the inventory.
Main Program
The main program should allow the user to choose an action from a menu such as adding an item, listing all items, updating the quantity of an item, or calculating the total inventory value. The menu should loop until the user decides to exit the program.
Deliverables
Source code files with wellcommented code.
Video showing the successful compilation and running of the program with you on camera narrating its functionality.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started