Exemplo n.º 1
0
 public Form1()
 {
     InitializeComponent();
     activeCoins     = new ActiveCoins();
     seasonTickets   = new SeasonTickets();
     entryMachine    = new Entry(activeCoins);
     exitMachine     = new Exit(activeCoins);
     payMachine      = new PayMachine(activeCoins);
     pedDoor         = new PedDoor();
     bays            = new List <Bay>();
     adminMachine    = new AdminMachine();
     availableSpaces = bays.Count();
     lblSpaces.Text  = availableSpaces.ToString();
     lblPrice.Text   = payMachine.GetAmount().ToString();
     numberCars      = 0;
 }
Exemplo n.º 2
0
 public PayMachine(ActiveCoins coins)
 {
     amount     = 2;
     hours      = 2;
     this.coins = coins;
 }
Exemplo n.º 3
0
 public Exit(ActiveCoins coins)
 {
     this.coins  = coins;
     exitBarrier = new Barrier();
     exitSensor  = new BarrierSensor();
 }
Exemplo n.º 4
0
 public Entry(ActiveCoins coins)
 {
     this.coins   = coins;
     entryBarrier = new Barrier();
     entrySensor  = new BarrierSensor();
 }