Free Web Hosting Provider - Web Hosting - E-commerce - High Speed Internet - Free Web Page
Search the Web

HexCell (Lab1)

Class HexCell

java.lang.Object
  |
  +--Cell
        |
        +--HexCell

public class HexCell
extends Cell

A Hexagonal Cell Area

Version:
1.0 (2002)
Author:
CPwJ

Constructor Summary
HexCell(double x, double y, double r)
          Define HexCellconstructor
 
Method Summary
 double area()
          Calculate the area of a Hexagonal shape Cell
 boolean coverage(double x, double y)
          Check whether a point is covered by the Hex cell
 
Methods inherited from class Cell
distance, getR, getX, getY, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HexCell

public HexCell(double x,
               double y,
               double r)
Define HexCellconstructor

Parameters:
x - Cell X coordinate
y - Cell Y coordinate
r - Cell Radius
Method Detail

area

public double area()
Calculate the area of a Hexagonal shape Cell

Specified by:
area in class Cell
Returns:
the area of the Hexagonal Cell

coverage

public boolean coverage(double x,
                        double y)
Check whether a point is covered by the Hex cell

Overrides:
coverage in class Cell
Parameters:
x - The x point of access coordinate
y - The y point of access coordinate
Returns:
True/False


Generated by BlueJ