edu.uchicago.cs.java.lec03.race
Class Gazelle
java.lang.Object
edu.uchicago.cs.java.lec03.boxing.Animal
edu.uchicago.cs.java.lec03.race.Gazelle
- All Implemented Interfaces:
- Raceable
public class Gazelle
- extends Animal
- implements Raceable
|
Constructor Summary |
Gazelle(java.lang.String strUrlAscii,
int nDim)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nDistance
private int nDistance
PACE_GAZELLE
public static final int PACE_GAZELLE
- See Also:
- Constant Field Values
VAR_GAZELLE
public static final int VAR_GAZELLE
- See Also:
- Constant Field Values
RAN
public static final java.util.Random RAN
Gazelle
public Gazelle(java.lang.String strUrlAscii,
int nDim)
getDistance
public int getDistance()
- Specified by:
getDistance in interface Raceable
setDistance
public void setDistance(int distance)
display
public java.lang.String display(int nIndent)
- Specified by:
display in interface Raceable- Overrides:
display in class Animal
stride
public void stride()
- Specified by:
stride in interface Raceable
vocalize
public java.lang.String vocalize()
- Specified by:
vocalize in interface Raceable