static void Main(string[] args)
 {
     Console.Title = "果园之间互换水果品种";
     BJSHOrchardist orchardist = new BJSHOrchardist();       //创建果农实例
     Orchard bjBJOrchard = new BJOrchard(orchardist);        //创建北京果园
     Orchard shBJOrchard = new SHOrchard(orchardist);        //创建上海果园
     orchardist.BJOrchard = bjBJOrchard;
     orchardist.SHOrchard = shBJOrchard;
     bjBJOrchard.PlantRemote();                              //北京果园种植上海水果
     shBJOrchard.PlantRemote();                              //上海果园种植北京水果
     Console.Read();
 }
Пример #2
0
        static void Main(string[] args)
        {
            Console.Title = "果园之间互换水果品种";
            BJSHOrchardist orchardist  = new BJSHOrchardist();      //创建果农实例
            Orchard        bjBJOrchard = new BJOrchard(orchardist); //创建北京果园
            Orchard        shBJOrchard = new SHOrchard(orchardist); //创建上海果园

            orchardist.BJOrchard = bjBJOrchard;
            orchardist.SHOrchard = shBJOrchard;
            bjBJOrchard.PlantRemote();                              //北京果园种植上海水果
            shBJOrchard.PlantRemote();                              //上海果园种植北京水果
            Console.Read();
        }