Пример #1
0
        //INPUT
        public void AddStudent(string fname, string lname, DateTime date, double tuition_fees)
        {
            int current_id = Students.Count + 1;
            var student    = new Student(current_id, fname, lname, date, tuition_fees);

            Students.Add(student);
            PrivateSchool.OutputStudents(student);
        }
Пример #2
0
        static void set_course_student(PrivateSchool CodingBootcamp)
        {
            CodingBootcamp.OutputCourses();
            int user_cource_data = CommonTools.CourseUserSelection();

            Console.WriteLine("\n\n\n\n\n\n\n\n\n\n");

            CodingBootcamp.OutputStudents();
            int user_student_data = CommonTools.StudentUserSelection();

            CodingBootcamp.StudentsCourses.Add(new StudentsCourse(user_cource_data, user_student_data));
        }
Пример #3
0
        static void set_assignment_student(PrivateSchool CodingBootcamp)
        {
            CodingBootcamp.OutputAssignments();
            int user_assignment_data = CommonTools.AssignmentUserSelection();

            Console.WriteLine("\n\n\n\n\n\n\n\n\n\n");

            CodingBootcamp.OutputStudents();
            int      user_student_data = CommonTools.StudentUserSelection();
            DateTime sub_date          = CommonTools.DateAssignmentInput();

            CodingBootcamp.StudentsAssignments.Add(new StudentsAssignment(user_assignment_data, user_student_data, sub_date));
        }
Пример #4
0
        static void UserMenuCase(PrivateSchool CodingBootcamp)
        {
            int user_case;

            do
            {
                try
                {
                    PrintUserMenu();
                    user_case = Convert.ToInt32(Console.ReadLine());
                    Console.WriteLine("\n\n\n\n\n\n\n");
                    switch (user_case)
                    {
                    case 1:
                        //Add Student
                        add_student(CodingBootcamp);
                        break;

                    case 2:
                        //Print Students
                        CodingBootcamp.OutputStudents();
                        break;

                    case 3:
                        //Add Trainer
                        add_teacher(CodingBootcamp);
                        break;

                    case 4:
                        //Print Trainers
                        CodingBootcamp.OutputTrainer();
                        break;

                    case 5:
                        //Add Course
                        add_course(CodingBootcamp);
                        break;

                    case 6:
                        //Print Courses
                        CodingBootcamp.OutputCourses();
                        break;

                    case 7:
                        //Add Assignment
                        add_assignment(CodingBootcamp);
                        break;

                    case 8:
                        //Print Assignments
                        CodingBootcamp.OutputAssignments();
                        break;

                    case 9:
                        //Assign Cource to Trainers
                        set_course_trainer(CodingBootcamp);
                        break;

                    case 10:
                        //Assign Cource to Students
                        set_course_student(CodingBootcamp);
                        break;

                    case 11:
                        //Assign Assignments to Students
                        set_assignment_student(CodingBootcamp);
                        break;

                    case 12:
                        //Print Cources Assigned to Trainers
                        CodingBootcamp.OutputCoursesTrainers();
                        break;

                    case 13:
                        //Print Cources Assigned to Students
                        CodingBootcamp.OutputCoursesStudents();
                        break;

                    case 14:
                        //Print Assignments Assigned to Students
                        CodingBootcamp.OutputAssignmentsStudents();
                        break;

                    case 15:
                        //Print Students that have More than 1 assignment
                        CodingBootcamp.OutputStudentsTwoAssignments();
                        break;

                    case 16:
                        //Print Assignments that have to be submited on day
                        set_assignment_week(CodingBootcamp);
                        break;

                    default:
                        Console.WriteLine("Please select a correct option!Please try again");
                        continue;
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                    Console.WriteLine("\nUse Input Fields Correctly Please!\n\n\n");
                    continue;
                }
            } while (true);
        }