Only for Java programmer or computer programming expert.

profilePerfectqsdf
CarStimulator.dia

#A4# #CarInstrumentSimulator# ## ## #main# ## #void# ## #args# #String[]# ## ## # Odometer # ## ## #mileage# #int# ## ## #mileage# #int# ## ## #fuelGauge# #FuelGauge# ## ## #MAX-MILLEAGE# #int# #999999# ## #MPG# #int# #24# ## #Odometer# ## ## ## #m# #int# ## ## #fg# #FuelGauge# ## ## #getMileage# ## #int# ## #incrementMileage# ## #void# ## #FuelGauge# ## ## #gallons# #int# ## ## #MAX_GALLONS# #int# #15# ## #FuelGauge# ## #o# ## #FuelGauge# ## ## ## #g# #int# ## ## #getGallons# ## #int# ## #incrementGallons# ## #void# ## #decrementGallons# ## #void# ## #Start# #Stop# #Constructor odometer creates two parameters m for mileage and fg for fuelGauge fuelGauge=fg mileage=m# #Start# #Stop# #return mileage# #Start# #Stop# #if mileage is over than max, "wrap around"# #mileage=mileage% (MAX_MILEAGE+1)# #Start# #Stop# #setPoint+=1# #while (setPoint>=MPG)# #fuelGauge.decrementGallons()# #setPoint=setPoint-MPG# #return gallons# #Start# #Stop# #if gallons<MAX_GALLONS# #gallons+=1# #Start# #Stop# #if gallons>=1# #gallons-=1# #Start# #Stop# # Create a FuelGuage object.# #Create an Odometer object to work with the FuelGauge object.# #Fill the car up with gas. for (int i = 0; i < fuel.MAX_GALLONS; i++) fuel.incrementGallons();# #while (fuel.getGallons() > 0)# #Drive a mile.# #Display the mileage.# #Display the amount of fuel.# ## ## ## ## ## #YES# #NO# #YES# #NO# #YES# #YES# #YES# #NO# #YES# #YES# ## #YES# ## #NO#