using System.Collections.Generic;
public static void Main(string[] args)
Office ofc1 = new Office();
ofc1.isHeadQuater = true;
ofc1.officeLocation = Location.Belfast;
ofc1.department = new Department("HR");
Office ofc2 = new Office();
ofc2.isHeadQuater = false;
ofc2.officeLocation = Location.London;
ofc2.department = new Department("ACCOUNTS");
Company c1 = new Company();
Office ofc3 = new Office();
ofc3.isHeadQuater = true;
Console.WriteLine(c1.office.Count);
public Department department
public Location officeLocation;
public Department(string d)
public string departmentName
public Employee[] recruitedBy
public List<Office> office = new List<Office>();
public void AddOffice(Office off)
if (office.Exists(ofc => ofc.isHeadQuater == true) && off.isHeadQuater == true)
Console.WriteLine("Already one ofc with headquarter set");