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
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.
Step by Step Solution
3.46 Rating (156 Votes )
There are 3 Steps involved in it
a Diagram Apartment aptNum num numBeds num numBaths num monthlyRent ... View full answer
Get step-by-step solutions from verified subject matter experts
