This is in Windowd Form. Create a House class with these fields; house year, purchase price, address, electric, gas, and water. Field should be private with appropriate property filters. Include a method that calculates total utility cost. The House calss should have a constructor that sets default values for each of the class characteristics. The House class shpuld have a constructor that allows the programmer to set all the properties in the main method. Create a second class Apartment that inheritance the properties from the House class but overrides the utility cost by cutting the cost in half.
Comments
Leave a comment