Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Add the following functionality to the previous lab Menu (use a switch statement) options to change status print all active items print all discontinued items
Add the following functionality to the previous lab
- Menu (use a switch statement) options to
- change status
- print all "active" items
- print all "discontinued" items
- print all "recalled" items
- sort by any field in ascending order
- Sorting
- Write one function to sort by any field using a parallel array of pointers
- Do not copy and paste sort code five times into the same function. Bubble sort is the easiest to modify.
- sorting using pointers is faster because you have to swap pointers only, which are normally stored in 4 bytes; it also allows you to preserve the original order of the items
- submenu for sorting options is optional
- if you create a submenu to sort by various fields, add an option to go back to the main menu without being forced to sort
- Printing all, active, recalled, and the discontinued items
- modify the print function created in the previous lab to print recalled and discontinued items as well
Write code in c++
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