Solved by: AllAcademicHelp.com
| October 29, 2018
Write my research papercar’s fuel gauge and odometer. The classes you will design are the following:The FuelGauge Class: This class will simulate a fuel gauge. Its responsibilities are asfollows:• To know the car’s current amount of fuel, in gallons.• To report the car’s current amount of fuel, in gallons.• To be able to increment the amount of fuel by 1 gallon. This simulates putting fuel inthe car. ( The car can hold a maximum of 15 gallons.)• To be able to decrement the amount of fuel by 1 gallon, if the amount of fuel is greaterthan 0 gallons. This simulates burning fuel as the car runs.The Odometer Class: This class will simulate the car’s odometer. Its responsibilities areas follows:• To know the car’s current mileage.• To report the car’s current mileage.• To be able to increment the current mileage by 1 mile. The maximum mileage theodometer can store is 999,999 miles. When this amount is exceeded, the odometerresets the current mileage to 0.• To be able to work with a FuelGauge object. It should decrease the FuelGaugeobject’s current amount of fuel by 1 gallon for every 24 miles traveled. ( The car’s fueleconomy is 24 miles per gallon.)Demonstrate the classes by creating instances of each. Simulate filling the car up withfuel, and then run a loop that increments the odometer until the car runs out of fuel.During each loop iteration, print the car’s current mileage and amount of fuel. Most important things to be done for the assignment.* Proper Validation should be done for the code. For example: asking the user forentering the number between (0-12) and user typed mistakely 13 or -1 then codeshould not be collapsed or error.1. Need to have proper design ( UML with Flowchart) with Dia app. Flowchart should be drawn for each method in UML.2. Proper comments.3.Proper doc-string describing each method in code.4.Proper Documentation should be for the code.5. with code the UML and flowcart should be matched.Purchase the answer to view itPurchase the answer to view itPurchase the answer to view itPurchase the answer to view it©Copyright 2000-2018. All Rights Reserved. TermPaperChampions.com: The most reliable provider of custom academic papers. Our writers are here to help you complete papers from all disciplines and academic levels . You can always trust us to deliver.
Get a 15 % discount on an order above $ 50Use the following coupon code :tpc15
READY TO PLACE AN ORDER