|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object CarDoc
public class CarDoc
The CarDoc class models some very basic information and functions of a car
Constructor Summary | |
---|---|
CarDoc(int inYearModel,
java.lang.String inMake,
java.lang.String inModel)
Initializes the attributes to the parameters and speed to 0 |
Method Summary | |
---|---|
void |
accelerate()
Increases the speed attribute by 5 (MPH) |
void |
brake()
Decreases the speed attribute by 5 (MPH). |
java.lang.String |
getMake()
Make getter |
java.lang.String |
getModel()
Model getter |
int |
getSpeed()
speed getter |
int |
getYearModel()
Year model getter |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CarDoc(int inYearModel, java.lang.String inMake, java.lang.String inModel)
Method Detail |
---|
public int getYearModel()
public java.lang.String getMake()
public java.lang.String getModel()
public int getSpeed()
public void accelerate()
public void brake()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |