basic java in netbeans

dodan
Balloon.html
Package   Class  Tree  Deprecated  Index  Help 
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Class Balloon

java.lang.Object
  
extended by
Balloon
public class Balloon
extends java.lang.Object

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

Balloon

public Balloon(java.lang.String theName,
               int theAltitude)
Create a ballon object with a given name at a given altitude.

Parameters:
theName - the name of the ballon object
theAltitude - the altitude
Method Detail

ascendTo

public void ascendTo(int newAlt)
Ascend to a particular altitude.

Parameters:
newAlt - the altitude to which to ascend, in meters.

descendTo

public void descendTo(int newAlt)
Descend to a particular altitude.

Parameters:
newAlt - the altitude to which to descend, in meters.

adjustAltitude

public void adjustAltitude(int change)
Modify altitude by a given number of meters, up or down.

Parameters:
change - number of meters to add to current altitude

getName

public java.lang.String getName()
Get ballon name.

Returns:
the name of the balloon

getAltitude

public int getAltitude()
Get current altitude.

Returns:
the altitude of the balloon
Package   Class  Tree  Deprecated  Index  Help 
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD