Class Rectangle
java.lang.Object
|
+--Rectangle
- public class Rectangle
- extends java.lang.Object
Copyright (c) Amish Parkh November 2001
Rectangle.java: The Rectangle class includes the private variable for
representing the x, y coordinates and height and width of the
green felt part of the table.
The Rectangle class includes basic methods: getX().getY(),
getHeight(), getWidth()
Constructor Summary |
Rectangle()
default Constructor |
Rectangle(double x,
double y,
double width,
double height)
Constructor with four agruements, x coordinate, y coordinate, width and height of the rectangle. |
Method Summary |
double |
getHeight()
get height of rectangle |
double |
getWidth()
get width of rectangle |
double |
getX()
get x coordinate of rectangle |
double |
getY()
get y coordinate of rectangle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Rectangle
public Rectangle()
- default Constructor
Rectangle
public Rectangle(double x,
double y,
double width,
double height)
- Constructor with four agruements, x coordinate, y coordinate, width and height of the rectangle.
getX
public double getX()
- get x coordinate of rectangle
getY
public double getY()
- get y coordinate of rectangle
getWidth
public double getWidth()
- get width of rectangle
getHeight
public double getHeight()
- get height of rectangle