Question: *It would be appreciated if you could take a picture or snapshot and put it up. I need help to write a C++ program to
*It would be appreciated if you could take a picture or snapshot and put it up. I need help to write a C++ program to keep track of a store inventory. The store sells various items. For each item in the store, the following information is kept: item ID, item name, number of pieces ordered, number of pieces currently in the store, number of pieces sold, manufacturers price for the item, and the stores selling price. At the end of each week, the store manager would like to see a report in the following form:
YOUOWEIT Hardware Store:
| Item ID | Item Name | Ordered | In Store | Sold | Manufacturer Price | Selling Price |
| 4444 3333 . . . | Circular Saw Cooking Range | 150
50 | 150
50 | 40
20 | 45.00
450.00 | 125.00
850.00 |
| Total Inventory: $#########.## Total number of items in the store: ----- | --- | --- | ---- | --- | ---- | ---- |
The total inventory is the total selling value of all of the items currently in the store. The total number of items is the sum of the number of pieces of all of the items in the store. Your program must be menu driven, giving the user various choices, such as checking whether an item is in the store, selling an item, and printing the report. After inputting the data, sort it according to the items names. Also, after an item is sold, update the appropriate counts. Initially, the number of pieces (of an item) in the store is the same as the number of pieces ordered, and the number of pieces of an item sold is zero. Input to the program is a file consisting of data in the following form:
itemID
itemName
Ordered In Store Sold Manufacturer Price Selling Price
Your program should use seven vectors to store the inventory information and it must implement the following functions:
(a) A function to read the data file (text file) and store the information in seven vectors
(b) A function to display the following menu:
1. Print report
2. Print sorted report (by Item Name)
3. Check an item is in the store (by Item ID)
4. Sell an item
5. Add item to the inventory
6. Save file
7. Quit (this option should automatically save the content of the seven vectors before existing program)
(c) A function to print the content of seven vectors similar to the report shown above
(d) A function to print one item information
(e) A function to sort the content of the seven vectors in ascending order by item name (be sure to swap the contents of the other six vectors as you sort the vector containing the item name)
(f) A function to save the content of the seven vectors to the original text file (Be sure to store them in a similar format as the original file).
(g) A function to search for an item (by Item ID) and calls the print item function to display the result (if it exists) as follows:
itemName:
Ordered:
In Store:
Sold:
Manufacturer Price:
Selling Price:
(h) A function to sell an item. After an item is sold, update the appropriate counts.
(i) A function to add inventory. This function should ask the user for Item ID and if the item exists it updates the ordered and the in store counts. Otherwise, the user must enter all information required by the database (itemName, Ordered, In Store, Manufacturer Price, and Selling Price). Note: Sold count is zero.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
