예제 #1
0
파일: Program.cs 프로젝트: dmmikl86/C-sharp
        private static void Main(string[] args)
        {
            Student[] students = new Student[SIZE];
            students[0] = new Student("Mich", "Dm");
            students[1] = new Student("Scott", "Liv");
            students[2] = new Student("Max", "Bill");

            Teacher[] teachers = new Teacher[SIZE];
            teachers[0] = new Teacher("Oleg", "Basilica");

            Degree degree = new Degree("Bachelor");
            UProgram uProgram = new UProgram("Information Technology");

            Course course = new Course("Programming with C#");
            course.AddStudents(students);
            course.AddTeacher(teachers[0]);
            degree.Course = course;
            uProgram.Degree = degree;

            Console.WriteLine(uProgram.ToString());
            Console.WriteLine(degree.ToString());
            Console.WriteLine(course.ToString());
        }
예제 #2
0
파일: Course.cs 프로젝트: dmmikl86/C-sharp
 public void AddStudents(Student[] students)
 {
     _students.AddRange(students);
 }
예제 #3
0
파일: Course.cs 프로젝트: dmmikl86/C-sharp
 public void AddStudent(Student student)
 {
     _students.Add(student);
 }