Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Enter
- {
- public static void Main()
- {
- Discipline dis1 = new Discipline("Math", 10, 20, "the science of quantity");
- Discipline dis2 = new Discipline("Biology", 1, 2);
- Discipline dis3 = new Discipline("Informatics", 1000, 20000, "hack the planet");
- List<Discipline> listDisciplines = new List<Discipline>();
- listDisciplines.Add(dis1);
- listDisciplines.Add(dis2);
- listDisciplines.Add(dis3);
- Student stud1 = new Student(1, "Pesho", "very dull");
- Student stud2 = new Student(2, "Mariika");
- List<Student> listStudents = new List<Student>();
- listStudents.Add(stud1);
- listStudents.Add(stud2);
- Teacher teacher1 = new Teacher(listDisciplines, "Nakov", "the boss");
- Teacher teacher2 = new Teacher(listDisciplines, "Goro");
- List<Teacher> listTeachers = new List<Teacher>();
- listTeachers.Add(teacher1);
- listTeachers.Add(teacher2);
- Class class1 = new Class("8A", listTeachers, listStudents);
- List<Class> listClasses = new List<Class>();
- listClasses.Add(class1);
- MySchool theBestSchool = new MySchool(listClasses);
- }
- }
- public class Class : Comments
- {
- private string uniqueIdentifier;
- private List<Teacher> listTeachers;
- private List<Student> listStudents;
- public Class(string uniuniqueIdentifier, List<Teacher> listTeachers, List<Student> listStudents)
- {
- this.uniqueIdentifier = uniuniqueIdentifier;
- this.listTeachers = listTeachers;
- this.listStudents = listStudents;
- }
- }
- public class Comments
- {
- private string optionalComment;
- public string OptionalComment
- {
- get
- {
- return this.optionalComment;
- }
- }
- public Comments(string optionalComment = null)
- {
- this.optionalComment = optionalComment;
- }
- }
- public class Discipline : Comments
- {
- private string name;
- private int numOfLectures;
- private int numOfExercises;
- public string Name
- {
- get
- {
- return this.Name;
- }
- }
- public int NumOfExercises
- {
- get
- {
- return this.numOfExercises;
- }
- }
- public int NumOfLectures
- {
- get
- {
- return this.numOfLectures;
- }
- }
- public Discipline(string name, int numOfLectures, int numOfExercises, string optionalComment = null) : base(optionalComment)
- {
- this.name = name;
- this.numOfLectures = numOfLectures;
- this.numOfExercises = numOfExercises;
- }
- }
- public class Human : Comments
- {
- private string name;
- public string Name
- {
- get
- {
- return this.name;
- }
- }
- public Human(string name, string optionalComment = null) : base(optionalComment)
- {
- this.name = name;
- }
- }
- public class MySchool
- {
- private List<Class> listClasses;
- public List<Class> ListClasses
- {
- get
- {
- return this.listClasses;
- }
- }
- public MySchool(List<Class> listClasses)
- {
- this.listClasses = listClasses;
- }
- }
- public class Student : Human
- {
- private int uniqueClassNum;
- public int UniqueClassNum
- {
- get
- {
- return this.uniqueClassNum;
- }
- }
- public Student(int uniqueClassNum, string name, string optionalComment = null) : base(name, optionalComment)
- {
- this.uniqueClassNum = uniqueClassNum;
- }
- }
- public class Teacher : Human
- {
- private List<Discipline> listDisciplines;
- public List<Discipline> ListDisciplines
- {
- get
- {
- return this.listDisciplines;
- }
- }
- public Teacher(List<Discipline> listDisciplines, string name, string optionalComment = null) : base(name,optionalComment)
- {
- this.listDisciplines = listDisciplines;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment