- The first car in the fleet has odometer readings of 1000, 1234, and gallons of 10
- The second car in the fleet has odometer readings of 777, 999, and gallons of 20
Answer:
class FleetTester
{
public static void main ( String[] args)
{
Fleet myCars = new Fleet( 1000, 1234, 10, 777, 999, 20 );
}
}
Constructor for Fleet
In this program, the cars that make up a fleet are constructed when the fleet is constructed. Here is the program with some additional work:
QUESTION 6:
Fill in the blanks in the constructor for Fleet.
It should construct each of the two cars.