Esempio n. 1
0
 public Bancomat()
 {
     _handler = new HundredDollarHandler(null);
     _handler = new FiftyDollarHandler(_handler);
     _handler = new TenDollarHandler(_handler);
     _handler = new TenRubleHandler(_handler);
 }
Esempio n. 2
0
 public Bancomat(CurrencyType type)
 {
     _type    = type;
     _handler = new BanknoteHandler(null, 20, _type);
     _handler = new BanknoteHandler(_handler, 50, _type);
     _handler = new BanknoteHandler(_handler, 200, _type);
     _handler = new BanknoteHandler(_handler, 1000, _type);
 }
Esempio n. 3
0
        public Bancomat()
        {
            _handler = new ErrorHandler(null);

            _handler = new FiveEuroHandler(_handler);
            _handler = new TenEuroHandler(_handler);
            _handler = new TwentyEuroHandler(_handler);
            _handler = new FiftyEuroHandler(_handler);
            _handler = new HundredEuroHandler(_handler);

            _handler = new TenRubleHandler(_handler);
            _handler = new FiftyRubleHandler(_handler);
            _handler = new HundredRubleHandler(_handler);
            _handler = new ThousandRubleHandler(_handler);

            _handler = new FiveDollarHandler(_handler);
            _handler = new TenDollarHandler(_handler);
            _handler = new TwentyDollarHandler(_handler);
            _handler = new FiftyDollarHandler(_handler);
            _handler = new HundredDollarHandler(_handler);
        }
 protected EuroHandlerBase(BanknoteHandler nextHandler) : base(nextHandler)
 {
 }
 protected RubelesHandlerBase(BanknoteHandler nextHandler) : base(nextHandler)
 {
 }
 protected DollarHandlerBase(BanknoteHandler nextHandler) : base(nextHandler)
 {
 }