예제 #1
0
 //Constructor
 public CarPark(TicketMachine ticketMachine, TicketValidator ticketValidator, FullSign fullSign, Barrier entryBarrier, Barrier exitBarrier)
 {
     this.ticketMachine   = ticketMachine;
     this.ticketValidator = ticketValidator;
     this.fullSign        = fullSign;
     this.entryBarrier    = entryBarrier;
     this.exitBarrier     = exitBarrier;
     currentSpaces        = maxSpace;
     currentPrePaidSpaces = maxPrePaid;
     this.entry           = new EntrySensor(this);
 }