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.


Constructor Index

 o CelestialObject()
Constructs a new CelestialObject at Point(0, 0)
 o CelestialObject(int, int)
Constructs a new CelestialObject at point _x, _y

Method Index

 o getLocation()
Returns the current location for this CelestialObject
 o getX()
Returns the x portion of the CelestialObject
 o getY()
Returns the y portion of the CelestialObject
 o setLocation(Point)
Changes current location of the CelestialObject to p

Constructors

 o CelestialObject
 public CelestialObject()
Constructs a new CelestialObject at Point(0, 0)

 o CelestialObject
 public CelestialObject(int _x,
                        int _y)
Constructs a new CelestialObject at point _x, _y

Methods

 o setLocation
 public void setLocation(Point p)
Changes current location of the CelestialObject to p

 o getLocation
 public Point getLocation()
Returns the current location for this CelestialObject

 o getX
 public int getX()
Returns the x portion of the CelestialObject

 o getY
 public int getY()
Returns the y portion of the CelestialObject


All Packages  Class Hierarchy  This Package  Previous  Next  Index