Question: Write a class named Room that has two fields one for the rooms length and one for the width. The class should have a constructor

Write a class named Room that has two fields one for the rooms length and one for the width. The class should have a constructor that sets the length and the width and a method named getArea that returns the rooms area (area = length x width). It should also have a method named isEqual (with a Room argument) that determines if the two rooms are equal or not. (25 points). Do not write the demo to test this class.

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!