Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems On GPUs In Databases

Authors: Johns Paul ,Shengliang Lu ,Bingsheng He

1st Edition

1680838482, 978-1680838480

More Books

Students also viewed these Databases questions