Exemple #1
0
 public ATM()
 {
     dispenser = new Dispenser();
     receiver  = new Receiver();
     printer   = new Printer();
     curPage   = 0;
 }
Exemple #2
0
        private static Dispenser GetATMDispenserBug()
        {
            var bill50Dispenser = new Dispenser(new Bill(50));
            var bill20Dispenser = new Dispenser(new Bill(20));

            bill50Dispenser.SetNext(bill20Dispenser);
            return(bill50Dispenser);
        }
Exemple #3
0
        private static Dispenser GetATMDispenser()
        {
            var bill50Dispenser = new Dispenser(new Bill(50));
            var bill20Dispenser = new Dispenser(new Bill(20));
            var bill10Dispenser = new Dispenser(new Bill(10));
            var bill5Dispenser  = new Dispenser(new Bill(5));

            //var bill1Dispenser = new Dispenser(new Bill(1));

            bill50Dispenser.SetNext(bill20Dispenser);
            bill20Dispenser.SetNext(bill10Dispenser);
            bill10Dispenser.SetNext(bill5Dispenser);
            //bill5Dispenser.SetNext(bill1Dispenser);
            return(bill50Dispenser);
        }