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 >>123 A Street
Enter apartment number >>321
Enter rent >>1100.01
Enter number of bedrooms >>2
Enter street address for apartment or ZZZ to quit >>456 B Street
Enter apartment number >>654
Enter rent >>1885.83
Enter number of bedrooms >>3
Enter street address for apartment or ZZZ to quit >>789 B Street
Enter apartment number >>987
Enter rent >>2300.27
Enter number of bedrooms >>2
Enter street address for apartment or ZZZ to quit >> ZZZ
123 A Street Apt number 321
Rent $1100.012 bedrooms
456 B Street Apt number 654
Rent $1885.833 bedrooms
789 B Street Apt number 987
Rent $2300.272 bedrooms

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!