SquareCell (Lab1)
Class SquareCell
java.lang.Object
|
+--Cell
|
+--SquareCell
- public class SquareCell
- extends Cell
A SquareCell
- Version:
- 1.0 (2002)
- Author:
- CPwJ
|
Constructor Summary |
SquareCell(double x,
double y,
double r)
SquareCell constructor |
|
Method Summary |
double |
area()
Calculate the area of a Square shape Cell |
boolean |
coverage(double x,
double y)
Check whether a point is covered by the Square cell |
SquareCell
public SquareCell(double x,
double y,
double r)
- SquareCell constructor
- Parameters:
x - Cell X coordinatey - Cell Y coordinater - Cell Radius
area
public double area()
- Calculate the area of a Square shape Cell
- Specified by:
area in class Cell
- Returns:
- the area of the Square Cell
coverage
public boolean coverage(double x,
double y)
- Check whether a point is covered by the Square cell
- Overrides:
coverage in class Cell
- Parameters:
x - The x point of access coordinatey - The y point of access coordinate
- Returns:
- True/False
Generated by BlueJ