/// <summary> /// Class constuctor /// </summary> /// <param name="name">Name of faculty</param> /// <param name="address">Address of faculty</param> /// <param name="dean">Dean of faculty</param> /// <param name="students">Faculty contains this list of students</param> public Faculty(string name, Address address, Dean dean, List <Student> students) : base(name, address) { Dean = dean; foreach (var student in students) { AddMember(student); } }
public void AddDean(Dean dean, int departmentId) { document.Root.Element("Deans").Add(new XElement("Dean", new XAttribute("Name", dean.Name) , new XAttribute("Age", dean.Age) , new XAttribute("Office", dean.Office) , new XAttribute("DepartmentId", departmentId))); document.Save(fileName); }
/// <summary> /// Class constructor /// </summary> /// <param name="name">Name of faculty</param> /// <param name="address">Address of faculty</param> /// <param name="dean">Dean of faculty</param> public Faculty(string name, Address address, Dean dean) : base(name, address) { Dean = dean; }