@Override public void unparkVehicle() { if (availableParking < capacity) { availableParking++; } else { DebugLib.stopSystemAndReportInconsistency( "trying to unpark vehicle from empty parking - parkingId:" + id + ""); } }
@Override public void parkVehicle() { if (availableParking > 0) { availableParking--; } else { DebugLib.stopSystemAndReportInconsistency( "trying to park vehicle on full parking - parkingId:" + id + ";"); } }