Question: QUESTION Write a program that has a class HOUSE. The house has an owner string, an location string, and rooms int to store the number
QUESTION Write a program that has a class HOUSE. The house has an owner "string", an location "string", and rooms "int" to store the number of rooms in the house. The class has the following methods: Set and get methods for each attribute. - Print method: prints the information "attributes" of the house. Area method: calculates and returns the area of the house. Area = number of rooms 9 In the main, do the following: Define two house objects with their data. Print the information of the two objects (with the area). - Print which house is larger by comparing the two areas of the houses. YE
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
