Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Company c = new ConcreteCompany("一个非叶子部门");
            Company d = new HrCompany("人事部门");

            c.Add(d);
            c.LineOfDuty();
            c.Display();
            Console.ReadKey();
        }
Exemplo n.º 2
0
 static void Main(string[] args)
 {
     Company c = new ConcreteCompany("一个非叶子部门");
     Company d = new HrCompany("人事部门");
     c.Add(d);
     c.LineOfDuty();
     c.Display();
     Console.ReadKey();
 }