Пример #1
0
 public void ViewParkedCar()
 {
     foreach (ParkSlotModel slot in slots)
     {
         if (!slot.isOccupied)
         {
             ParkingMessages.DisplayFreeSpaceText(slot.slotId);
         }
         else
         {
             CarMessages.DisplayParkedCars(slot.slotId, slot.car);
         }
     }
 }
Пример #2
0
        public void DisplayParkedCars()
        {
            int parkedCar = 0;

            foreach (ParkSlotModel slot in slots)
            {
                if (slot.isOccupied)
                {
                    CarMessages.DisplayParkedCars(slot.slotId, slot.car);
                    parkedCar++;
                }
            }
            if (parkedCar == 0)
            {
                ParkingMessages.ParkEmpty();
            }
        }