Question: Write a LandTract class that has two double fields: one for the tract's length and one for the width. The class should have the following
Write a LandTract class that has two double fields: one for the tract's length and one for the width. The class should have the following methods:
A constructor with two parameters.
getArea return the tract's area.
equals return true if the current tract has the same length and width as the passing tract.
toString return a string indicating the land tract's length, width and area
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
