예제 #1
0
    static void Main(string[] args)
    {
        EggRoll p1 = new EggRoll(100, "EggRoll 1");

        Cheese cheese = new Cheese(12, "cheese");
        Ham    ham    = new Ham(5, "ham");
        Egg    egg    = new Egg(10, "egg");

        Console.WriteLine("Material: ");
        ham.Decorate(p1);
        cheese.Decorate(ham);
        egg.Decorate(cheese);

        egg.Calculate();
    }