NOTE: ENTER YOUR UDIL ID ON THE PACKAGE (edu.iltu.itk275.assignment4.yourUDIL) All of the java classes should be placed in a package named edu.iltu.itk275.assignment4.. The class should be submitted as an attachment to this assignment. They may be submitted individually or placed into a single archive (.zip) file. Define a class named Odometer that will be used to track fuel and mileage for an automobile. The class should have instance variables to track the miles driven and the fuel efficiency of the vehicle in miles per gallon. Include a mutator method to reset the Odometer to zero miles, a mutator method to set the fuel efficiency, a mutator method that accepts miles driven for a trip and adds it to the odomoters total, and an accessor method that returns the number of gallons of gasoline that the vehicle has consumed since the odometer was last reset. Use your class with a test application named OdometerTest that creates several trips with different fuel efficiencies. You should decide which Odometer attributes should be public, if any.
Programming
[Solved] SOLVED: A class named Odometer that will be used to track fuel and mileage for an automobile.
$25
File Name: SOLVED:_A_class_named_Odometer_that_will_be_used_to_track_fuel_and_mileage_for_an_automobile..zip
File Size: 876.06 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.