Question: For this project I am using eclipse and on lines 1 1 1 and 1 4 9 I am getting errors this is only includes

For this project I am using eclipse and on lines 111 and 149 I am getting errors this is only includes part 1 of the but part 2 isn't answered in the question. This is part 2. Part 2:
After you are comfortable with the Car class, create a Garage class to store Cars. The Garage
object is an instantiation of a Garage class that contains parking, an array of the Car class. You
must use a Car[] not an ArrayList for the parking in the garage. You will use Car objects
to fill the parking in the garage.
You will need to create the CarGarageDriver class to work with the Car objects and a Garage
object. I will provide an algorithm for the CarGarageDriver class as a test driver to test your Car
and Garage classes.
The rules for the garage are:
The size of the parking space in the garage is specified by the user.
The user may only use cars from the garage
A Car is removed from the Garage when a user retrieves a Car from the Garage.
o This means that its reference is copied from the parking space, the reference is
deleted (set to null) in the parging space and then the reference is passed to the
calling method.
The Car is returned to the Garage, after it is driven if it does not run out of fuel before it
gets back to the Garage.
The user interacts with the Car object after the Car object is retrieved from the garage.
o While the reference to the car object is in the garage the garage is only allowed
to interact with the car object.
The program should not fail due to a user input.
o You are responsible for identifying improper input and having the user correct
that input before moving on.
A car may only be refueled while in the Garage.
o User talks to Garage and Garage talks to Car.
o The Garage should implement the method:
+addFuelToCar(int pCarSpace, double pFuelToAdd):double remainingFuel
which will call the Cars package addFuelToTank(double): double method.
The user may select to drive any car that is currently in the garage.
The user is the only one that may request that a car be refueled(do not refuel a car
automatically)
4
NOVA Online CSC 222
After the user gets a Car, they set up the drive by entering in the average speed and the
driving distance.
See the Car methods above.
the driving distance is the round-trip distance from the garage and back again.
The driver program is only allowed to use the Cars public methods listed above, and
those you create for the Garage class.
The user drives the car by telling that car to drive. Again, you may use menus to offer
options to the user.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!