Complete the following tasks: a. Create a class named Apartment that includes an apartment number, number of

Question:

Complete the following tasks:

a. Create a class named Apartment that includes an apartment number, number of bedrooms, number of baths, and monthly rent. Include two overloaded constructors. The default constructor sets each field to 0. The nondefault constructor accepts four parameters—one for each field. Include two overloaded display() methods. The parameterless version displays all the Apartment details. The second version accepts a value that represents a maximum rent and displays the Apartment details only if the Apartment’s rent is no greater than the parameter.

b. Create an application that instantiates several Apartment objects and demonstrates all the methods.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: