(Vehicle vehicle)
| 32 | |
| 33 | /* Try to find a place to park this vehicle. Return false if failed. */ |
| 34 | public boolean parkVehicle(Vehicle vehicle) { |
| 35 | if (availableSpots() < vehicle.getSpotsNeeded()) { |
| 36 | return false; |
| 37 | } |
| 38 | int spotNumber = findAvailableSpots(vehicle); |
| 39 | if (spotNumber < 0) { |
| 40 | return false; |
| 41 | } |
| 42 | return parkStartingAtSpot(spotNumber, vehicle); |
| 43 | } |
| 44 | |
| 45 | /* Park a vehicle starting at the spot spotNumber, and continuing until vehicle.spotsNeeded. */ |
| 46 | private boolean parkStartingAtSpot(int spotNumber, Vehicle vehicle) { |
nothing calls this directly
no test coverage detected