public class Car { private String name; private int mpg; private int cap; private double remainingFuelInTank; /** * Answers a new object of type Car * @param String name name of the newly created Car * @param int mpg miles per gallon * @param int cap fuel tank capacity */ public Car(String carName, int milesPerGallon, int maxTankCapacity) { name = carName; mpg = milesPerGallon; cap = maxTankCapacity; remainingFuelInTank = maxTankCapacity; } /** * Answers a new object of type Car * @param String name name of the new Car * **/ public Car(String carName) { this.name = carName; this.mpg = 10; this.cap = 10; this.remainingFuelInTank = 10; } /** * Fills the gas tank. */ public void fillTank() { } /** * Drives the car the number of miles specified * -- if the number of miles is more than can be driven * with remaining fuel, do not take any action * @param double miles number of miles to drive the car */ public void drive(double miles) { } /** * Answers the tank capacity * @return the tank capacity */ public int getTankCapacity() { return 0; } /** * Answers the remaining fuel in the tank * @return the amount of fuel in the tank */ public double getFuelInTank() { return 0.; } /** * Answers the name of the car * @return the name of the car */ public String getCarName() { return ""; } }