コード例 #1
0
        static void Main(string[] args)
        {
            ICoffeType cappuccino      = new Cappuccino();
            Large      largeCappuccino = new Large();

            largeCappuccino.SetCoffeType(cappuccino);
            largeCappuccino.Make();

            ICoffeType espresso      = new Espresso();
            Small      smallEspresso = new Small();

            smallEspresso.SetCoffeType(espresso);
            smallEspresso.Make();
        }