예제 #1
0
        static void Main(string[] args)
        {
            Marketing abe    = new Marketing("Abe", "CMO");
            Marketing rachel = new Marketing("Rachel", "Marketing Assistant");
            Marketing sarah  = new Marketing("Sarah", "Intern");
            Finance   debbie = new Finance("Debbie", "CFO");

            Company asp = new Company("Appalachia Service Project", DateTime.Now);

            asp.addEmployee(debbie);
            asp.addEmployee(abe);
            asp.addEmployee(rachel);
            asp.addEmployee(sarah);

            foreach (Employee person in asp.marketingDpt)
            {
                Console.WriteLine($"{person.Name} works in the Marketing department and is a {person.JobTitle}");
            }
        }
예제 #2
0
 public void addEmployee(Marketing marketingEmployee)
 {
     marketingDpt.Add(marketingEmployee);
 }