Only for java Programmer or Computer Science Expert Not Essay Writer Please
/** * Description: This class is used to simulate the operation of odometer and * Fuelgauge by making use of Odometer and FuelGauge class * it helps to see how the two class operate and interact with each other * Class: Fall - COSC 1437.81003 * Assignment7: CarDemo class code * Date: 10/23/2018 */ /** * This class CarDemo is used to simulate the operation of odometer and * Fuelgauge by making use of Odometer and FuelGauge class * it helps to see how the two class operate and interact with each other * @author Bhaskar Bharati * @version 0.6.12 */ public class CarDemo { /** * This is the main method that controls the operation of the program * * @param args as String */ public static void main(String[] args) { //creating instance needed to interact with the program FuelGauge gauge = new FuelGauge(15); Odometer odometer = new Odometer(420, gauge); //if the tank still has fuel left move(increment mileage and decrement //gallons while (gauge.getGallons() != 0) { odometer.incrementMileage(); System.out.println("Mileage: " + odometer.getMileage()); System.out.println("Fuel Capacity(Gallons): " + gauge.getGallons()); } } }