예제 #1
0
        static void Main(string[] args)
        {
            Person Tony = new Person("Tony");

            Console.WriteLine("\n第一種裝扮:");
            Finery dtx = new TShirts();
            Finery kk  = new BigTrouser();
            Finery pqx = new Sneakers();

            pqx.Decorate(Tony);
            kk.Decorate(pqx);
            dtx.Decorate(kk);
            dtx.Show();

            Console.Read();
        }
예제 #2
0
        static void Main(string[] args)
        {
            Person Tony = new Person("Tony");

            Console.WriteLine("\n第一種裝扮:");
            Finery dtx = new TShirts();
            Finery kk = new BigTrouser();
            Finery pqx = new Sneakers();

            pqx.Decorate(Tony);
            kk.Decorate(pqx);
            dtx.Decorate(kk);
            dtx.Show();

            Console.Read();
        }