Esempio n. 1
0
 static void MyCoffe(HotDrink xCoffee)
 {
     CupOfCoffee x = new CupOfCoffee();
     x = (CupOfCoffee) xCoffee;
     x.AddMilk();
     x.Drink();
     x.Wash();
 }
Esempio n. 2
0
 static void MyTea(HotDrink xTea)
 {
     CupOfTea x = new CupOfTea("",0,"");
     x = (CupOfTea) xTea;
     x.AddMilk();
     x.Drink();
     x.Wash();
     Console.WriteLine("Цвет {0}",x.Color);
     Console.WriteLine("Объем {0}",x.Volume);
     Console.WriteLine("Тип листьев {0}",x.LeafType);
 }