示例#1
0
        public VisitorForm()
        {
            InitializeComponent();
            _liqour         = new Liquor();
            lbLiquor.Text  += _liqour.GetPrice().ToString();
            _tobacco        = new Tobacco();
            lbTobacco.Text += _tobacco.GetPrice().ToString();
            _hamburger      = new Hamburger();
            lbBurger.Text  += _hamburger.GetPrice().ToString();

            _visitor = new DutchVisitor();
            SwitchDutch();
        }
示例#2
0
 public decimal Visit(Hamburger hamburgerItem)
 {
     return(hamburgerItem.GetPrice() * 1.1m);
 }