Question: Write an application called ApartmentsLinkedList that contains a LinkedList in which to store Apartment objects. Prompt the user for values for Apartment objects and add
Write an application called ApartmentsLinkedList that contains a LinkedList in which to store Apartment objects. Prompt the user for values for Apartment objects and add them to the LinkedList until the sentinel value ZZZ is entered. Sort the Apartment objects by rent value, and then display the sorted list.
An example of the program is shown below:
Enter street address for apartment or ZZZ to quit A Street
Enter apartment number
Enter rent
Enter number of bedrooms
Enter street address for apartment or ZZZ to quit B Street
Enter apartment number
Enter rent
Enter number of bedrooms
Enter street address for apartment or ZZZ to quit B Street
Enter apartment number
Enter rent
Enter number of bedrooms
Enter street address for apartment or ZZZ to quit ZZZ
A Street Apt number
Rent $ bedrooms
B Street Apt number
Rent $ bedrooms
B Street Apt number
Rent $ bedrooms
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
