I have the rest of the program finished I am just stumped on these methods. we didn't go over this in class and its not in any of the notes. I don't want the answer per se I just need a fresh pair of eyes.
Edit: forgot to add the instructions for the methods A method contains(double x, double y) that returns true if the specified point (x, y) is inside this rectangle. See Figure below. .A method contains(Rectangle 2D rectangle) that returns true if the specified rectangle is inside this rectangle. See Figure. .A method overlaps(Rectangle 2D rectangle) that returns true if the specified rectangle overlaps with this rectangle. See the figure.
class Rectangle2D {
double x;
double y;
double width;
double height;
public Boolean Contains(double x, double y) {
return false;
}
public Boolean Contains(Rectangle2D R1) {
return false;
}
public Boolean Overlap(Rectangle2D R1) {
return false;
}
}