public ParkingSpace allocateFreeSpace(ParkingSpaceType pspaceType) { //get a ParkingSpace from the corresponding free list ParkingSpace pspace = ParkingSpace.defalultNonImplemented; pspace.setStart(); return(pspace); }
public float reclaimFreeSpace(ParkingSpace pspace) { pspace.setEnd(); //return free space to the list return(pspace.getFee(perm)); }
public override bool park(ParkingLot pLot) { //get a ParkingSpace from the corresponding free list ParkingSpace pspace = ParkingSpace.defalultNonImplemented; if ((pspace = pLot.allocateFreeSpace(ParkingSpaceType.HANDICAPPED)) == null && (pspace = pLot.allocateFreeSpace(ParkingSpaceType.CAR)) == null) { return(false); } return(true); }