Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using your latest personType class from our programming assignments (A8/A9), write a menu-driven program that: 1. Loads into an array of personType, the 20
Using your latest personType class from our programming assignments (A8/A9), write a menu-driven program that: 1. Loads into an array of personType, the 20 people stored in the attached text file. This is not part of the menu. You only load once. You may also copy/paste from the file manually instead. The bottom line is that you have to get the data I provide in the file into your arrays. 2. Implement the following functions: int seqSearch (const list[], int listLength, string searchItem). Given a 1d array of personTypes, the number of elements in the array, and a target last name, return the index for the first match in the array or -1 if not found. This must be case insensitive and return a match on substrings/partial hits (i.e., "Star Wars" contains "WAR" would match). The first match, whatever it is, would be returned. int tallestPerson(const personType &argl, const personType &arg2). Given two personType objects (arg1, arg2) return 0 if arg1 is taller than arg2 else return 1. int shortestPerson(const personType &arg1, const personType &arg2). Given two personType objects (arg1, arg2) return 0 if arg1 is taller than arg2 else return 1. void selectionSort(.. list[], int length) (Sort) Given a 1d array of personTypes and the number of elements, sort the array of personTypes by height in ascending order using the selection sort. This function only sorts. It does not print anything. 3. Create the following menu driver. Search for a person (Print the person if found, otherwise a not found message) Tallest person (Prints the tallest person) Shortest person (Prints the shortest person) Print by Height (Calls the appropriate sorting algorithm and displays all the people from shortest to tallest) Quit IMPORTANT: The selectionSort, tallestPerson, shortestPerson functions do not print ANYTHING. You are to handle the printing requirements in int main() (Except for the personType print method). Submission Requirements: all .cpp and .h files must be completed prior to the deadline. Turn in a screenshot showing the successful compilation/linkage of your code and (5) screenshots showing the following. MAKE SURE TO NAME YOUR SCREENSHOTS so I can tell which is which. Screenshot #0 Screenshot #1 - - Successful Compiling and Linking Menu Option Search for "meg" Screenshot#2 Result of calling Menu Option "Tallest Person" Screenshot #3 Screenshot#4 people.txt - - Result of calling Menu Option "Shortest Person" Result of calling Menu Option "Print by Height" Extra Credit: (10 pts) Document your code so that ALL of your personType functions show meaningful descriptions o In doxygen along with a UML. Turn in a screenshot of the resulting UML (Screenshot#5) to trigger my review of your doxygen html file on gryffi ndor.
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