Question: Hello! I am having a problem with my code. I keep getting this error and I am not sure why. Here is my instructions, my

Hello! I am having a problem with my code. I keep getting this error and I am not sure why. Here is my instructions, my code and the error message. The code is done in Java. May you please help me solve this issues?

Hello! I am having a problem with my code. I keep gettingthis error and I am not sure why. Here is my instructions,my code and the error message. The code is done in Java.

sules for parking: As the occupancy instance variable is populated, you need to ensure that the following rules are always respected: - No car can be parked at a spot that is designated NA in the lot design; - A car cannot be parked at an out-of-bound position; - At most one car can be parked at any given (non-NA) spot; - An electric car is allowed to park at any (non-NA) spot: ELECTRIC, SMALL, REGULAR, LARGE; - A small car is allowed to park only at the following spot types: SMALL, REGULAR, LARGE; - A regular car is allowed to park only at the following spot types: REGULAR, LARGE; - A large car is allowed to park only at the following spot type: LARGE; If a car in the input file violates any of the above rules, it will not be parked at the specified spot. For example, consider the input file in Figure 5. For this input file, only one of the cars specified, namely the car with plate C3, can be parked. C1 is a large car attempting to park at a small spot (0,1). C2 is attempting to park at an NA spot (2,2). C4 is attempting to park at a spot already occupied by C3. Finally, C5 is attempting to park at a spot with indices that are out of bound. ParkingLot.java:135: error: bad operand types for binary operator ' return ( ( spot == CarType.ELECTRIC) || (spot == CarType.SMALL) (spot == CarType.REGULAR) ||( spot = CarType.LARGE )); first type: boolean second type: CarType

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 Databases Questions!