the question is like this:
wirte a class method intersction, that has two Rectangle parameters, the methods should return the rectangle formed by the area common to the two retangles. if they do not intersect, the method should reurn the rectangle whose instance fields are all zero. if the rectangles touch, the method should return a "rectangle" of zero width or zero lenght.
by the way, the class rectangle looks something like this
class Rectangle
{
private int left; // x-coordinate of left edge
private int bottom; // y-coordinate of left edge
private int width;
private int height;
public static Rectangle intersection(Rectnagle r)
{
??????? // quesitons???
}
Start Free Trial