| 
 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectBalloon
public class Balloon
A class to represent a hot-air balloon. Balloon objects have a name and an altitude.
| Constructor Summary | |
|---|---|
| Balloon(java.lang.String theName,
        int theAltitude)Create a ballon object with a given name at a given altitude. | |
| Method Summary | |
|---|---|
|  void | adjustAltitude(int change)Modify altitude by a given number of meters, up or down. | 
|  void | ascendTo(int newAlt)Ascend to a particular altitude. | 
|  void | descendTo(int newAlt)Descend to a particular altitude. | 
|  int | getAltitude()Get current altitude. | 
|  java.lang.String | getName()Get ballon name. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public Balloon(java.lang.String theName,
               int theAltitude)
theName - the name of the ballon objecttheAltitude - the altitude| Method Detail | 
|---|
public void ascendTo(int newAlt)
newAlt - the altitude to which to ascend, in meters.public void descendTo(int newAlt)
newAlt - the altitude to which to descend, in meters.public void adjustAltitude(int change)
change - number of meters to add to current altitudepublic java.lang.String getName()
public int getAltitude()
| 
 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||