Пример #1
0
        public static void AddElement(int option, List <Assignment> assignmentList,
                                      List <Student> studentList, List <Trainer> trainerList, List <Course> courseList, List <StudentsPerCourse> studentsPerCourseList,
                                      List <TrainersPerCourse> trainersPerCourseList, List <AssignmentsPerCourse> assignmentsPerCourseList, List <Student> multipleCourseStudents, List <AssignmentsPerStudent> assignmentsPerStudentsList)
        {
            int noOfEntries;

            do
            {
                Console.Write("How many entries would you like to add? ");
                noOfEntries = Convert.ToInt32(Console.ReadLine());
            } while (noOfEntries < 1);

            switch (option)
            {
            case 1:
                CourseUtils.CourseEntry(noOfEntries, courseList, studentsPerCourseList, trainersPerCourseList, assignmentsPerCourseList);
                break;

            case 2:
                AssignmentsUtils.AssignmentEntry(noOfEntries, assignmentList, assignmentsPerCourseList, assignmentsPerStudentsList, studentsPerCourseList);
                break;

            case 3:
                TrainerUtils.TrainerEntry(noOfEntries, trainerList, trainersPerCourseList);
                break;

            case 4:
                StudentUtils.StudentEntry(noOfEntries, studentList, studentsPerCourseList, assignmentsPerCourseList, assignmentsPerStudentsList);
                break;

            case 5:
                StudentUtils.AddExistingStudentToASecondCourse(noOfEntries, studentList, studentsPerCourseList, multipleCourseStudents);
                break;
            }
        }
Пример #2
0
        public static void PrintList(int option, List <Assignment> assignmentList,
                                     List <Student> studentList, List <Trainer> trainerList, List <Course> courseList, List <StudentsPerCourse> studentsPerCourseList,
                                     List <TrainersPerCourse> trainersPerCourseList, List <AssignmentsPerCourse> assingmnetsPerCourseList, List <Student> multipleCourseStudents, List <AssignmentsPerStudent> assignmentsPerStudentsList)
        {
            switch (option)
            {
            case 1:
                CourseUtils.PrintCoursesList(courseList);
                Console.WriteLine();
                break;

            case 2:
                AssignmentsUtils.PrintAssignmentsList(assignmentList);
                Console.WriteLine();
                break;

            case 3:
                TrainerUtils.PrintTrainersList(trainerList);
                Console.WriteLine();
                break;

            case 4:
                StudentUtils.PrintStudentsList(studentList);
                Console.WriteLine();
                break;

            case 5:
                StudentsPerCourseListUtils.PrintStudentPerCourse(studentsPerCourseList);
                Console.WriteLine();
                break;

            case 6:
                TrainersPerCourseListUtils.PrintTrainerPerCourse(trainersPerCourseList);
                Console.WriteLine();
                break;

            case 7:
                AssignmentsPerCourseListUtils.PrintAssignmentPerCourse(assingmnetsPerCourseList);
                Console.WriteLine();
                break;

            case 8:
                StudentUtils.PrintStudentsList(multipleCourseStudents);
                Console.WriteLine();
                break;

            case 9:
                AssignmentsPerStudentUtils.ChooseStudentToPrintAssignments(studentList, studentsPerCourseList, assingmnetsPerCourseList, assignmentsPerStudentsList);
                Console.WriteLine();
                break;

            case 10:
                AssignmentsPerStudentUtils.PrintStudentsWithSubmissionDate(assignmentsPerStudentsList);
                Console.WriteLine();
                break;
            }
        }
Пример #3
0
 public static void StudentEntry(int noOfEntries, List <Student> studentList, List <StudentsPerCourse> studentsPerCourseList, List <AssignmentsPerCourse> assignmentsPerCourseList, List <AssignmentsPerStudent> assignmentsPerStudentList)
 {
     for (int i = 0; i < noOfEntries; i++)
     {
         Console.WriteLine($"\n---Entry no{i + 1}---\n");
         Student temp = StudentUtils.GetStudentDetails();
         studentList.Add(temp);
         StudentsPerCourseListUtils.AddStudentToCourse(studentsPerCourseList, temp);
         AssignmentsPerStudentUtils.AddStudentToAssignmentsPerStudentList(temp, studentsPerCourseList, assignmentsPerCourseList, assignmentsPerStudentList);
     }
 }