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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!