Question: Create a class named Apartment that holds an apartment number, number of bedrooms, number of baths, and rent amount. Create a constructor that accepts values
Create a class named Apartment that holds an apartment number, number of bedrooms, number of baths, and rent amount. Create a constructor that accepts values for each data field. Also create a get method for each field. Write an application that creates at least five Apartment objects. Then prompt a user to enter a minimum number of bedrooms required, a minimum number of baths required, and a maximum rent the user is willing to pay.
Display data for all the Apartment objects that meet the user’s criteria or an appropriate message if no such apartments are available. Save the files as Apartment.java and TestApartments.java.
Step by Step Solution
3.49 Rating (159 Votes )
There are 3 Steps involved in it
Apartmentjava public class Apartment int aptNumber int bedrooms double baths double rent public Apar... View full answer
Get step-by-step solutions from verified subject matter experts
