DEFAULT_MPGto represent a default MPG of 23.0.
fleet. Implement a
mainmathod in this class. As before, this is for your own testing; I will use my own main method to grade your program. This
fleetclass should have two instance variables of type
secondaryCar. Implement accessors and mutators for these properties.
sizethat returns the number of cars (0, 1, or 2) in the fleet.
toStringmethod should take no arguments and return a
Stringcontaining the size of the fleet and the mileage and fuel level of any cars that are in the fleet.
mainmethod, create a fleet, print it out, add a primary and secondary car, and again get (and print) the description. Drive each car 30 miles, then 60 miles. Fuel up the primary car and then attempt to drive each 300 miles. Print out the fleet's description after each step. Then add a new primary car and print the fleet. When you create each car, immediately fill its gas tank and set the average miles per gallon to the value in the
Submit as per the syllabus.