Question: Write a test program to test all methods. Exercise 10.13 10.13 (Geometry: the MyRectangle2D class) Define the MyRectangle2D class that contains: Two double data fields

Write a test program to test all methods. Exercise 10.13 10.13 (Geometry: the MyRectangle2D class) Define the MyRectangle2D class that contains: Two double data fields named x and y that specify the center of the rec- tangle with getter and setter methods. (Assume that the rectangle sides are parallel to x- or y-axes.) The data fields width and height with getter and setter methods. A no-arg constructor that creates a default rectangle with (0, 0) for (x, y) and 1 for both width and height. A constructor that creates a rectangle with the specified x, y, width, and height
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
