All Packages Class Hierarchy This Package Previous Next Index
Class DopplerProgram.CelestialObject
java.lang.Object
|
+----DopplerProgram.CelestialObject
- public class CelestialObject
- extends Object
An object similar to point to keep track of a CelestialObject.
Both earth and galaxy of DopplerProgram use it.
-
CelestialObject()
- Constructs a new CelestialObject at Point(0, 0)
-
CelestialObject(int, int)
- Constructs a new CelestialObject at point _x, _y
-
getLocation()
- Returns the current location for this CelestialObject
-
getX()
- Returns the x portion of the CelestialObject
-
getY()
- Returns the y portion of the CelestialObject
-
setLocation(Point)
- Changes current location of the CelestialObject to p
CelestialObject
public CelestialObject()
- Constructs a new CelestialObject at Point(0, 0)
CelestialObject
public CelestialObject(int _x,
int _y)
- Constructs a new CelestialObject at point _x, _y
setLocation
public void setLocation(Point p)
- Changes current location of the CelestialObject to p
getLocation
public Point getLocation()
- Returns the current location for this CelestialObject
getX
public int getX()
- Returns the x portion of the CelestialObject
getY
public int getY()
- Returns the y portion of the CelestialObject
All Packages Class Hierarchy This Package Previous Next Index