Write a class named measurement that holds info about the person’s name and person’s height (in centimeters). The class should have a constructor and any appropriate methods. Build the application class by creating an instance of the class and provide the inputs. The program should display the output as following:
Notes: Use for loop to receive input from user and call insert() to pass inputs entered.
Person #1:
Name: Patty
Height (in cm): 144
Person #2:
Name: Paul
Height (in cm): 187
Person #3:
Name: Lorraine
Height (in cm): 165
Person #4:
Name: John
Height (in cm): 136
================================================== ========
Sorting by Person’s name or Person’s height?
1 Person’s name
2 Person’s height
Enter your choice: 2
Choose selection:
1 Bubble Sort (sorting in ascending order)
2 Selection Sort (sorting in descending order)
3 Insertion Sort (sorting in Odd-Even ascending order)
Enter your choice: 1
Sorting in Ascending order (Bubble Sort):
Name: John Height (in cm): 136
Name: Patty Height (in cm): 144
Name: Lorraine Height (in cm): 165
Name: Paul Height (in cm): 187
Continue?(y/n) : y
Choose selection:
1 Bubble Sort (sorting in ascending order)
2 Selection Sort (sorting in descending order)
3 Insertion Sort (sorting in Odd-Even order)
Enter your choice: 3
Choose selection:
1 Odd-Even Ascending
2 Odd-Even Descending
Enter your choice: 2
Odd-Even Descending Order:
(Odd) Patty(144cm) , John (136cm)
(Even)Paul(187cm) , Lorraine(165cm)
Continue?(y/n) : n
Highest of Height: Name: Paul , Height:187
Lowest of Height: Name: John , Height: 136
Average of Height: 158.0