Esempio n. 1
0
        static void Main(string[] args)
        {
            Corporate   parkwood  = new Corporate("Parkwood Entertainment");
            Subunit     marketing = new Subunit(1, "Marketing");
            Subunit     arts      = new Subunit(2, "Artists & Repertoire");
            Subunit     brands    = new Subunit(3, "Brands");
            Subunit     smed      = new Subunit(4, "Social media marketing");
            Subunit     tv        = new Subunit(5, "TV marketing");
            WhiteCollar bey       = new WhiteCollar("Beyonce", "Knowles", "CEO", "4/09/1981", true);
            WhiteCollar jlo       = new WhiteCollar("Jennifer", "Lopez", "Singer", "24/07/1969", false);
            WhiteCollar emgad     = new WhiteCollar("Emin", "Gadzhiev", "Marketing specialist", "22/01/2000", false);

            marketing.AddSubUnit(smed);
            marketing.AddSubUnit(tv);
            arts.AddEmployee(bey);
            arts.AddEmployee(jlo);
            smed.AddEmployee(emgad);
            emgad.SetHead();
            parkwood.AddDepartments(marketing);
            parkwood.AddDepartments(arts);
            parkwood.AddDepartments(brands);

            Console.WriteLine(parkwood.CorpName + " Hierarachy");

            foreach (Subunit subunit in parkwood.Departments)
            {
                PrintUnitInfo(subunit, 3);
            }
            Console.ReadLine();
        }
Esempio n. 2
0
 public void AddEmployee(WhiteCollar employee)
 {
     Employees.Add(employee);
 }