Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started