Using your latest personType class from our programming assignments (A8/A9), write a menu-driven program that: 1....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. <1> Search for a person (Print the person if found, otherwise a not found message) <2> Tallest person (Prints the tallest person) <3> Shortest person (Prints the shortest person) <4> Print by Height (Calls the appropriate sorting algorithm and displays all the people from shortest to tallest) <5> 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 <1> Search for "meg" Screenshot#2 Result of calling Menu Option <2> "Tallest Person" Screenshot #3 Screenshot#4 people.txt - - Result of calling Menu Option <3> "Shortest Person" Result of calling Menu Option <4> "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. 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. <1> Search for a person (Print the person if found, otherwise a not found message) <2> Tallest person (Prints the tallest person) <3> Shortest person (Prints the shortest person) <4> Print by Height (Calls the appropriate sorting algorithm and displays all the people from shortest to tallest) <5> 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 <1> Search for "meg" Screenshot#2 Result of calling Menu Option <2> "Tallest Person" Screenshot #3 Screenshot#4 people.txt - - Result of calling Menu Option <3> "Shortest Person" Result of calling Menu Option <4> "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.
Expert Answer:
Posted Date:
Students also viewed these accounting questions
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
In this programming assignment you will practice using ArrayLists, Inheritance and Polymorphism. You are to write a game called Magical Creatures War. You will do this by implementing a class called...
-
Palmer Cheese Company is a small manufacturer of several different cheese products. One product is a cheese spread sold to retail outlets. Susan Palmer must decide how many cases of cheese spread to...
-
The Corporate Law and Economic Reform Programme (CLERP 9) 2004 proposed reforms to improve and maintain the independence of auditors in carrying out their assurance engagement. One of these reforms...
-
Trundle Inc. makes two styles of trophies, basic and deluxe, and operates at capacity. Trundle does large custom orders. Trundle budgets to produce 10,000 basic trophies and 5,000 deluxe trophies....
-
Delta Manufacturing has budgeted for the following unit sales: Units 2016 April 25,000 40,000 in May June 60,000 julio 45,000 Of the budgeted units, 40% are sold by the Coastal Division at an average...
-
Find out the degree of freedom of the following mechanisms. d
-
verify that the indicated function is an explicit solution of the given differential y" + y = tan x; y = (cos x)ln(secx + tan .x) Question 2: verify that the indicated family of functions is a...
-
Create the entire truth table for this statement. p^ (qVr) 2. (10 POINTS) Create the entire truth table for this statement. (p^g) V (p^r) 3. (2 POINTS) Refer to your answers to Problems 1 and 2 to...
-
ABC company deals in agriculture machines. Due to severe price competition in the market, the company has been experiencing a decrease in revenues in recent times. The situation led the company to...
-
Consider a bond with a 10% coupon rate and face value of $1,000. a. Calculate the price of the bond for different yields to maturity and times to maturity. Think about the price for yields from 5% to...
Study smarter with the SolutionInn App