A+ Work






Requirements

For this assignment, you are required to complete two files (dwelling.py and program111.py) provided in the zip named chapter11.zip. The dwelling.py file currently defines a Dwelling class and a subclass named House. This code is working. Your task here is to add two more subclasses (Apt and Condo) as described below. The program111.py file creates an instance of house and runs its str method. This also works. Your task in program111.py is to create instances of both new subclasses and display the status of each. Start by unzipping the zip file. Examine both files and execute program111.py to see how it runs.

Class Apt:

·       inherits from Dwelling and requires two more attributes:
o      rent, a numeric attribute for monthly rent.
o      terrace, a boolean attribute that is True for an apartment that has a terrace or balcony.
·       requires a str method to display the status of an Apt instance (all attributes). Code as you see fit.

Class Condo:

·       also inherits from Dwelling and requires two additional attributes:
o      mtce, a numeric attribute for the monthly maintenance.
o      amenities, a string attribute listing Condo amenities such as pool, gym, etc.
·       also requires a str method to display the status of a Condo instance (all attributes). Again, code as you wish.

In program111.py, create instances of both new subclasses and display their attributes.