|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--CarJetta
This is an example class used in lecture
| Constructor Summary | |
CarJetta(java.lang.String intitialColor)
The constructor, that sets up the gas tank, and paints car |
|
| Method Summary | |
static void |
changeTankSize(double newTankSize)
A class method to change gas tank size |
double |
checkGasLevel()
A mehtod to return the gas level |
void |
emptyTank(double gasAmount)
A mehtod to lower the amount of gas in the tank |
void |
fillTank(double gasAmount)
A mehtod to raise the amount of gas in the tank |
java.lang.String |
getColor()
A mehtod to return the current car color |
static double |
getTankSize()
A class method to return the gass tank size |
void |
paintCar(java.lang.String newColor)
A mehtod to change the current car color |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CarJetta(java.lang.String intitialColor)
intitialColor - The initial color to paint car| Method Detail |
public static void changeTankSize(double newTankSize)
newTankSize - The new size of the tankpublic static double getTankSize()
public void paintCar(java.lang.String newColor)
newColor - The new car colorpublic java.lang.String getColor()
public void fillTank(double gasAmount)
gasAmount - An amount of gas to add to tankpublic void emptyTank(double gasAmount)
gasAmount - An amount of gas to remove from tankpublic double checkGasLevel()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||