Question: Please write a java code for the below problem: Create a more sophisticated Rectangle class than the one you created above. This class stores only
Please write a java code for the below problem:
Create a more sophisticated Rectangle class than the one you created above. This class stores only the Cartesian coordinates of the four corners of the rectangle. The constructor calls a set method that accepts four sets of coordinates and verifies that each of these is in the first quadrant with no single x- or y-coordinate larger than 20.0. The set method also verifies that the supplied coordinates specify a rectangle. Provide methods to calculate the length, width, perimeter and area (the length is the larger of the two dimensions). Write a program to test class Rectangle
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
