Class StationaryObject

java.lang.Object
  extended by BoxedBallsObject
      extended by StationaryObject
Direct Known Subclasses:
Block, Wall

public class StationaryObject
extends BoxedBallsObject

Parent class for all stationary objects. It inherits the properties of BoxedBallsObject. All stationary objects have a velocity=0, and their mass, for the purpose of momentum calculations, is effectively infinity


Field Summary
static double STATIONARY_OBJECT_MASS
          1.0/0.0 produces infinity
static double STATIONARY_OBJECT_VELOCITY
           
 
Constructor Summary
StationaryObject()
           
StationaryObject(String s, Color c)
           
 
Method Summary
 Color getColor()
           
 double getMass()
           
 double getXVelocity()
           
 double getYVelocity()
           
 
Methods inherited from class BoxedBallsObject
getName, setColor, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATIONARY_OBJECT_MASS

public static final double STATIONARY_OBJECT_MASS
1.0/0.0 produces infinity

See Also:
Constant Field Values

STATIONARY_OBJECT_VELOCITY

public static final double STATIONARY_OBJECT_VELOCITY
See Also:
Constant Field Values
Constructor Detail

StationaryObject

public StationaryObject()

StationaryObject

public StationaryObject(String s,
                        Color c)
Method Detail

getMass

public double getMass()

getXVelocity

public double getXVelocity()

getYVelocity

public double getYVelocity()

getColor

public Color getColor()
Overrides:
getColor in class BoxedBallsObject