Answered You can hire a professional tutor to get the answer.
The question from the text is: Construct a program that c reates a Person class that contains strings that represent the first and last name of a...
The question from the text is:
Construct a program that c reates a Person class that contains strings that represent the first and last name of a person and their age. You will need to construct a Queue class that will store each person in the queue and can sort the queue based on last name or age.
Prompt the user of the program to add five people to the queue. Your program should provide the contents of the queue and then sort the queue using the quick sort in two ways:
- Descending order by last name.
- Descending order by age.
I have written my Queue Interface and my Queue Class per the text. The part I am having trouble with is the Person class.
My Questions:
How do I make a loop to store multiple person classes in a queue?
How would I go about having to sort multiple Person classes by attributes?