示例#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();
        }