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}"); } }
public void addEmployee(Marketing marketingEmployee) { marketingDpt.Add(marketingEmployee); }