Question: using python 3 A)Suppose a class called House has private data members called numRooms, squareFootage, marketValue. a.Write the EXACT Python code that would appear in
using python 3
A)Suppose a class called House has private data members called numRooms, squareFootage, marketValue.
a.Write the EXACT Python code that would appear in the House class for the following:
b.Constructor: accepts the # of rooms, square footage, and market value.
c.Method that allows retrieval of the number of rooms.
d.Method that allows revision/change of the square footage
e.Method that will allow the users of the House class to print their h1 object using a statement such as print(h1) so that it displays as shown: Number of Rooms: 5 Square Footage: 2040 Market Value: $215,000
b)
Suppose MSUMPerson has the following attributes:
an attribute called nextIDNum is initialized to 100 and keeps track of the next available ID so that when an object is created, they receive a unique ID that hasnt already been used.
an attribute called idNum which will contain the ID for each individual person object that is created.
An attribute called population which is initialized to 0 and keeps track of the total number of MSUMPerson objects that have been created.
Complete the code for the class so that it has ONLY a constructor method
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
