Пример #1
0
 public void CupOfHotDrink()
 {
     CupOfCoffe coffe = new CupOfCoffe();
     CupOfTea tea = new CupOfTea();
     coffe.AddMilk();
     coffe.Drink();
     tea.AddMilk();
     tea.Drink();
     ICup cupcofee = coffe;
     ICup cuptea = tea;
     cupcofee.Wash();
     cuptea.Wash();
 }
Пример #2
0
        public void CupOfHotDrink()
        {
            CupOfCoffe coffe = new CupOfCoffe();
            CupOfTea   tea   = new CupOfTea();

            coffe.AddMilk();
            coffe.Drink();
            tea.AddMilk();
            tea.Drink();
            ICup cupcofee = coffe;
            ICup cuptea   = tea;

            cupcofee.Wash();
            cuptea.Wash();
        }