Question: language is python Code the program below. All programs must contain and use a main function Create a program that contains the three classes as
language is python


Code the program below. All programs must contain and use a main function Create a program that contains the three classes as follows along with their respective data: Dwelling Variables typeOfDwelling value rooms Functions printData() get_dwelling Type() str_0 House Variables address numOfFloors Functions printData() str_0) Apartment Variables address apartmentNumber Functions printData() str_0 House and Apartment should inherit from the Dwelling class and implement their own __init_method that calls said class on creation. Each printData() method should be overridden to include the class' respective variables (ie, the House class should also print out the address and numOffloors) Each __str_0 method should be overridden to return (not print) the data as a formatted string when the object is called as a string get_dwellingType() should return the type of dwelling (house/apartment) Create two objects, one of type House and one of type Apartment. Call all of their functions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
