A college must track equipment items purchased using special funds. Create a struct name Inventory that represents an equipment item. An equipment item consists of an 8-alphanumeric inventory number, a short description of the item, the purchase price of the item, and its current location (e.g.: room/building location). If an item is surplussed (e.g., gotten rid of), then the current location should say surplus, but the item should remain on the list. Write a program that reads inventory items from a file into a vector. Implement a menu system that allows the user to add, edit, and delete records from the list as well as search the list based on inventory number and print a report of all records. The list should always be maintained in order of inventory number. When the program closes, the data file should be overwritten with the most recent data from the list. Write a function for each option. Functions should be as listed. Name Return Type Description add int Function adds a new inventory item to the vector and returns the location where it was added. edit bool Allows the user to edit the values of an item. Returns true/false as an indication of success. remove bool Removes an item from the vector.Returns true/false as an indication of success. search int Locates an item in the vector by the inventory items. print void Prints either a specific item or all items in the vector. Sample Output 1 - Add 2 - Edit 3 - Delete 4 - Search 5 - Print All 6 - Exit Selction: 4 Inventory Number: 14-4343-41 Item found. 14-4343-41 Cabinet 175.00 AW-212 1 - Add 2 - Edit 3 - Delete 4 - Search 5 - Print All 6 - Exit Selction: 2 Inventory Number to edit: 14-4343-41 Editing 14-4343-41 1 - Name 2 - Price 3 - Location 4 - Done Selection: 1 New Name: Cabinets Selection: 2 New Price: 278.00 Selection: 4 Updated Record: 14-4343-41 Cabinets 278.00 AW-212 1 - Add 2 - Edit 3 - Delete 4 - Search 5 - Print All 6 - Exit Selction: 3 Inventory Number to delete: 14-4343-41 Successfully deleted. 1 - Add 2 - Edit 3 - Delete 4 - Search 5 - Print All 6 - Exit Selction: 1 Inventory Number: 13-7889-77 Name: Server Price: 1290.99 Location: LK-980 Sucessfully added. 1 - Add 2 - Edit 3 - Delete 4 - Search 5 - Print All 6 - Exit Selection: 6
A college must track equipment items purchased using special funds.
Create a struct name Inventory that represents an equipment item. An equipment item consists of an 8-alphanumeric inventory number, a short description of the item, the purchase price of the item, and its current location (e.g.: room/building location). If an item is surplussed (e.g., gotten rid of), then the current location should say surplus, but the item should remain on the list.
Write a program that reads inventory items from a file into a
Write a function for each option. Functions should be as listed.
Name | Return Type | Description |
---|---|---|
add | int | Function adds a new inventory item to the vector and returns the location where it was added. |
edit | bool | Allows the user to edit the values of an item. Returns true/false as an indication of success. |
remove | bool | Removes an item from the vector.Returns true/false as an indication of success. |
search | int | Locates an item in the vector by the inventory items. |
void | Prints either a specific item or all items in the vector. |
Sample Output
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)