Beispiel #1
0
        public ParkingSpace allocateFreeSpace(ParkingSpaceType pspaceType)
        {
            //get a ParkingSpace from the corresponding free list
            ParkingSpace pspace = ParkingSpace.defalultNonImplemented;

            pspace.setStart();
            return(pspace);
        }
Beispiel #2
0
        public float reclaimFreeSpace(ParkingSpace pspace)
        {
            pspace.setEnd();

            //return free space to the list

            return(pspace.getFee(perm));
        }
Beispiel #3
0
        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);
        }