|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectTrail
This class models a ski trail at a CSE 142 SkiResort.
| Constructor Summary | |
Trail(String trailName,
int difficultyLevel,
Lift mover)
Create a new Trail using the given parameters. |
|
| Method Summary | |
int |
getDifficulty()
Get the difficulty level of this trail. |
String |
getName()
Get the name of this trail. |
void |
roundTrip(Skier theSkier)
Move a skier to the top of the trail, and then let them ski down, using the zoomUp and swoopDown methods. |
void |
swoopDown(Skier theSkier)
Let a skier ski down the trail if they are at the top of the trail. |
String |
toString()
Return a string description of this trail. |
void |
zoomUp(Skier theSkier)
Move a skier to the top of the trail using the associated lift. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Trail(String trailName,
int difficultyLevel,
Lift mover)
trailName - the name of this TraildifficultyLevel - an int value, 0 or more. 0 is easy,
1 is more difficult, 2 is most difficult, 3 or more is expert only.mover - the transportation to the top of the Trail| Method Detail |
public String getName()
public int getDifficulty()
public void roundTrip(Skier theSkier)
theSkier - the person doing the skiingpublic void zoomUp(Skier theSkier)
theSkier - the person doing the skiingpublic void swoopDown(Skier theSkier)
theSkier - the person doing the skiingpublic String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||