The Car Class Construction
/**
* The Car class will model a car. It will be able to have
* gas added to it, drive a certain distance and report the
* amount of gas left in the tank
*
* @author (your name)
* @version (a version number or a date)
*/
Instance Fields | Methods |
|
|
Constructors // generic values: public Car() // initialize all instance fields to generic values public Car(double mpg) // initialize all instance fields to generic values except for mpg public Car(double mpg, double tankSize) // make all else generic
|