Answered step by step
Verified Expert Solution
Link Copied!

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 console-based inventory management system that tracks the stock of items in a store. This system will use various types of functions, user-defined data types, and arrays.
Requirements
User-Defined Data Types
Define a struct named `Item` that contains the following fields: `id`(integer),`name`(string),`price`(float), and `quantity`(integer).
Arrays
Create an array of `Item` structs named `inventory` that will store the stock of the store.
Functions
Implement the following functions:
`addItem(Item 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.
`listItems(const Item inventory[], int size)`: Accepts the inventory array and the current number of items, then prints all the items in the inventory.
`updateQuantity(Item inventory[], int size)`: Accepts the inventory array and the current number of items, then allows the user to update the quantity of an item.
`calculateTotalValue(const 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 file(s) with well-commented 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Access Patterns Database Interactions In Object Oriented Applications

Authors: Clifton Nock

1st Edition

0321555627, 978-0321555625

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago