我有3題 java 題目唔識呀, 唔該識既人教我呀!
我用bluej的
謝謝!
1) Implement a class Car with the following properties. A car has acertain fuel efficiency (measured in miles/gallon or litres/km-pickone) and a certain amount of fuel in the gas tank. The efficiency isspecified in the constructor, and the initial fuel level is 0. Supply amethod drive thatsimulates driving the car for a certain distance,reducing the fuel level in the gas tank. Also supply methods getGas,returning the current fuel level, and addGas, to tank up. Sample usage: ... |