Question: build point rectangle with same location and dimensions as parameter rectangle (JAVA) indow Help D PointRectanglejava 3PointRectangleTestjavaWalletjava DWalletTestjava 9 public class PointRectangle f 10 11
indow Help D PointRectanglejava 3PointRectangleTestjavaWalletjava DWalletTestjava 9 public class PointRectangle f 10 11 private Point upperLeft; 12 13 14 I/Constructors 15 private Point lowerRight; 16 public PointRectangle(Point upperLeft, Point lowerRight) ( 17 18 19 20 21 22 /* 2 super); this.upperLeft upperLeft; this.lowerRight lowerRight; 3 Builds a PointRectangle with the same location and dimensions as.the 24 25 *parameter rectangle. 26 public PointRectangle (Rectangle r) //ADD CODE 27 28 29 30 31 //Getters 32 public Point getUpperLeft) ( return upperLeft; 34 35 36 public Point getLowerRight) ( 37 38 39 40 //Setters 41 return lowerRight; 42 public void setUpperLeft(Point upperLeft) 43 this.upperLeft upperLeft; 45 6 public void setLowerRight (Point lowerRight) ( 47 48 49 this.lowerRight lowerRight; 50 /Instance Methods
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
