public Campus(string name, List <Student> students, List <Teacher> teachers, LeadTeacher principal, List <Cursus> cursus) { Name = name; Students = students; Teachers = teachers; Principal = principal; Cursus = cursus; }
public static Person CreatePerson(List <Person> PersonsList) { if (PersonsList.GetType() == typeof(List <Teacher>)) { Person person = new LeadTeacher(); return(person); } else if (PersonsList.GetType() == typeof(List <Student>)) { Person person = new Teacher(); return(person); } else { Person person = new Student(); return(person); } }