static void Main(string[] args) { Person xc = new Person("小菜"); Console.WriteLine("\n第一种装扮:"); Finery dtx = new TShirts(); Finery kk = new BigTrouser(); Finery pqx = new Sneakers(); dtx.Show(); kk.Show(); pqx.Show(); xc.Show(); Console.WriteLine("\n第二种装扮:"); Finery xz = new Suit(); Finery ld = new Tie(); Finery px = new LeatherShoes(); xz.Show(); ld.Show(); px.Show(); xc.Show(); Console.Read(); }
static void Main(string[] args) { Person xc = new Person("小菜"); Console.WriteLine("\n第一种装扮:"); Finery dtx = new TShirts(); Finery kk = new BigTrouser(); Finery pqx = new Sneakers(); dtx.Show(); kk.Show(); pqx.Show(); xc.Show(); Console.WriteLine("\n第二种装扮:"); Finery xz = new Suit(); Finery ld = new Tie(); Finery px = new LeatherShoes(); xz.Show(); ld.Show(); px.Show(); xc.Show(); Console.Read(); }
static void Main(string[] args) { var p = new Parson("小菜"); var bigT = new BigTrouser(); var t = new TShirts(); var s = new Sneaker(); t.Decorate(p); s.Decorate(t); bigT.Decorate(s); bigT.Show(); }
static void Main(string[] args) { Person person = new Person("陈远"); Console.WriteLine("\n 第一种装扮:"); TShirts shirts = new TShirts(); BigTrouser bigTrouser = new BigTrouser(); Sneakers sneakers = new Sneakers(); shirts.Show(); bigTrouser.Show(); sneakers.Show(); person.Show(); Console.ReadLine(); }