MCPcopy Index your code
hub / github.com/careercup/ctci / clearSpots

Method clearSpots

java/Chapter 8/Question8_4/Vehicle.java:25–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23
24 /* Remove car from spot, and notify spot that it's gone */
25 public void clearSpots() {
26 for (int i = 0; i < parkingSpots.size(); i++) {
27 parkingSpots.get(i).removeVehicle();
28 }
29 parkingSpots.clear();
30 }
31
32 public abstract boolean canFitInSpot(ParkingSpot spot);
33 public abstract void print();

Callers 1

parkStartingAtSpotMethod · 0.80

Calls 4

removeVehicleMethod · 0.80
clearMethod · 0.80
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected