Exercises
static Point center(Rectangle r)
return the center point of r.
static int area(Rectangle r)
return the area of r.
static boolean isCenter(Rectangle r, Point p)
class Point {
public int x;
public int y;
}
class Size {
public int width;
public int height;
}
class Rectangle {
public Point point;
public Size size;
}
Previous slide
Back to first slide
View graphic version