コード例 #1
0
ファイル: TestSchool.cs プロジェクト: CuST0M1z3/OOP
        public static void Main()
        {
            School mySchool = new School();
            Class firstClass = new Class("12A");
            Teacher firstTeacher = new Teacher("Niki");
            Discipline firstDiscipline = new Discipline("OOP", 3, 3);
            Student firstStudent = new Student("Ivan", 5);
            Student secondStudent = new Student("Kaloqn", 15);

            mySchool.AddClass(firstClass);
            firstClass.AddTeacher(firstTeacher);
            firstTeacher.AddDiscipline(firstDiscipline);
            firstClass.AddStudent(firstStudent);
            firstClass.AddStudent(secondStudent);

            Console.WriteLine(firstClass.ToString());
            Console.WriteLine();
        }
コード例 #2
0
ファイル: Class.cs プロジェクト: CuST0M1z3/OOP
 public void AddStudent(Student student)
 {
     this.Students.Add(student);
 }