Example #1
0
 public static void SyntheticTeachers(PrivateSchool CodingBootcamp, int times)
 {
     for (int i = 0; i < times; i++)
     {
         CodingBootcamp.AddTrainer("Fwtini", "Psychogiou", "C#");
     }
 }
Example #2
0
        static void Main(string[] args)
        {
            PrivateSchool CodingBootcamp = new PrivateSchool();

            CommonTools.SyntheticDataUserSelection(CodingBootcamp);
            UserMenuCase(CodingBootcamp);
        }
Example #3
0
 public static void SyntheticCourses(PrivateSchool CodingBootcamp)
 {
     CodingBootcamp.AddCource("C# - Full Time", "Full Time", "C#", new DateTime(2019, 1, 1), new DateTime(2019, 3, 1));
     CodingBootcamp.AddCource("C# - Part Time", "Part Time", "C#", new DateTime(2019, 1, 1), new DateTime(2019, 6, 1));
     CodingBootcamp.AddCource("JAVA - Full Time", "Full Time", "JAVA", new DateTime(2019, 1, 1), new DateTime(2019, 3, 1));
     CodingBootcamp.AddCource("JAVA - Full Time", "Part Time", "JAVA", new DateTime(2019, 1, 1), new DateTime(2019, 6, 1));
 }
Example #4
0
 public static void SyntheticCourses(PrivateSchool CodingBootcamp, int times)
 {
     for (int i = 0; i < times; i++)
     {
         CodingBootcamp.AddCource("C# - Full Time", "Full Time", "C#", new DateTime(2019, 1, 1), new DateTime(2019, 3, 1));
     }
 }
Example #5
0
 public static void SyntheticAssignments(PrivateSchool CodingBootcamp, int times)
 {
     for (int i = 0; i < times; i++)
     {
         CodingBootcamp.AddAssignments("Assignment 1", "This is a test assingment - 1", new DateTime(2019, 1, 1));
     }
 }
Example #6
0
 public static void SyntheticStudentsAssignments(PrivateSchool CodingBootcamp)
 {
     CodingBootcamp.StudentsAssignments.Add(new StudentsAssignment(1, 1, new DateTime(2019, 1, 2)));
     CodingBootcamp.StudentsAssignments.Add(new StudentsAssignment(2, 2, new DateTime(2019, 1, 7)));
     CodingBootcamp.StudentsAssignments.Add(new StudentsAssignment(1, 1, new DateTime(2019, 1, 2)));
     CodingBootcamp.StudentsAssignments.Add(new StudentsAssignment(2, 2, new DateTime(2019, 1, 7)));
 }
Example #7
0
 public static void SyntheticStudents(PrivateSchool CodingBootcamp, int times)
 {
     for (int i = 0; i < times; i++)
     {
         CodingBootcamp.AddStudent("Alex", "Psychoson", new DateTime(1995, 2, 1), 2500);
     }
 }
Example #8
0
 public static void SyntheticTeachers(PrivateSchool CodingBootcamp)
 {
     CodingBootcamp.AddTrainer("Fwtini", "Psychogiou", "C#");
     CodingBootcamp.AddTrainer("Amalia", "Papa", "JAVA");
     CodingBootcamp.AddTrainer("Dimitra", "Doyka", "C#");
     CodingBootcamp.AddTrainer("Stela", "Pyrgaki", "JAVA");
 }
Example #9
0
        //-----------------Intput For Trainer------------------\\
        static void add_teacher(PrivateSchool CodingBootcamp)
        {
            string name    = CommonTools.NameTrainerInput();
            string lname   = CommonTools.LastnameTrainerInput();
            string subject = CommonTools.SubjectTrainerInput();

            CodingBootcamp.AddTrainer(name, lname, subject);
        }
Example #10
0
        public void AddCource(string title, string stream, string type, DateTime start_date, DateTime end_date)
        {
            int current_id = Courses.Count + 1;
            var course     = new Course(current_id, title, stream, type, start_date, end_date);

            Courses.Add(course);
            PrivateSchool.OutputCourses(course);
        }
Example #11
0
        public void AddAssignments(string title, string desc, DateTime sub_date)
        {
            int current_id = Assignments.Count + 1;
            var assignment = new Assignment(current_id, title, desc, sub_date);

            Assignments.Add(assignment);
            PrivateSchool.OutputAssignments(assignment);
        }
Example #12
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);
        }
Example #13
0
        public void AddTrainer(string fname, string lname, string subject)
        {
            int current_id = Trainers.Count + 1;
            var trainer    = new Trainer(current_id, fname, lname, subject);

            Trainers.Add(trainer);
            PrivateSchool.OutputTrainer(trainer);
        }
Example #14
0
        //-----------------Intput For Course------------------\\
        static void add_course(PrivateSchool CodingBootcamp)
        {
            string   title     = CommonTools.TitleCourseInput();
            string   stream    = CommonTools.StreamCourseInput();
            string   type      = CommonTools.TypeCourseInput();
            DateTime StartDate = CommonTools.StartEndDateCourseInput(out DateTime EndDate);

            CodingBootcamp.AddCource(title, stream, type, StartDate, EndDate);
        }
Example #15
0
 public static void SyntheticAssignments(PrivateSchool CodingBootcamp)
 {
     CodingBootcamp.AddAssignments("Assignment 1", "This is a test assingment - 1", new DateTime(2019, 1, 1));
     CodingBootcamp.AddAssignments("Assignment 2", "This is a test assingment - 2", new DateTime(2019, 2, 1));
     CodingBootcamp.AddAssignments("Assignment 3", "This is a test assingment - 3", new DateTime(2019, 3, 1));
     CodingBootcamp.AddAssignments("Assignment 4", "This is a test assingment - 4", new DateTime(2019, 4, 1));
     CodingBootcamp.AddAssignments("Assignment 5", "This is a test assingment - 5", new DateTime(2019, 5, 1));
     CodingBootcamp.AddAssignments("Assignment 6", "This is a test assingment - 6", new DateTime(2019, 6, 1));
 }
Example #16
0
        //-----------------Intput For User------------------\\
        static void add_student(PrivateSchool CodingBootcamp)
        {
            string   name         = CommonTools.NameStudentInput();
            string   lname        = CommonTools.LastnameStudentInput();
            DateTime dateOfBirth  = CommonTools.DateOfBirthStudentInput();
            double   tuition_fees = CommonTools.TuitionStudentInput();


            CodingBootcamp.AddStudent(name, lname, dateOfBirth, tuition_fees);
        }
Example #17
0
        //-----------------Intput For Assignment------------------\\
        static void add_assignment(PrivateSchool CodingBootcamp)
        {
            string   name     = CommonTools.NameAssignmentInput();
            string   desc     = CommonTools.DescAssignmentInput();
            DateTime sub_date = CommonTools.DateAssignmentInput();

            //string oral_mark = CommonTools.OralMarkAssignmentInput();

            CodingBootcamp.AddAssignments(name, desc, sub_date);
        }
Example #18
0
        static void set_course_trainer(PrivateSchool CodingBootcamp)
        {
            CodingBootcamp.OutputCourses();
            int user_cource_data = CommonTools.CourseUserSelection();

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

            CodingBootcamp.OutputTrainer();
            int user_trainer_data = CommonTools.TrainerUserSelection();

            CodingBootcamp.TrainersCourses.Add(new TrainersCourse(user_cource_data, user_trainer_data));
        }
Example #19
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));
        }
Example #20
0
 public static void SyntheticStudents(PrivateSchool CodingBootcamp)
 {
     CodingBootcamp.AddStudent("Alex", "Psychoson", new DateTime(1995, 12, 10), 2500);
     CodingBootcamp.AddStudent("Nikos", "Papas", new DateTime(1997, 7, 10), 2500);
     CodingBootcamp.AddStudent("Dimitris", "Doykas", new DateTime(1990, 8, 20), 2500);
     CodingBootcamp.AddStudent("Stelios", "Pyrgaki", new DateTime(1985, 2, 10), 2500);
     CodingBootcamp.AddStudent("Hektor", "Kontoes", new DateTime(1975, 9, 1), 2500);
     CodingBootcamp.AddStudent("Argyris", "Koukounasoulis", new DateTime(1965, 2, 12), 2500);
     CodingBootcamp.AddStudent("Manos", "papadakakis", new DateTime(1955, 3, 21), 2500);
     CodingBootcamp.AddStudent("Kwstas", "gkikas", new DateTime(1987, 4, 12), 2500);
     CodingBootcamp.AddStudent("Mpampis", "panago", new DateTime(1987, 1, 16), 2500);
     CodingBootcamp.AddStudent("Artemis", "psycho", new DateTime(1967, 2, 19), 2500);
 }
Example #21
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));
        }
Example #22
0
        //-------------Common--------------\\
        public static void SyntheticDataUserSelection(PrivateSchool CodingBootcamp)
        {
            SyntheticDataMenu();
            int a = Convert.ToInt32(Console.ReadLine());

            switch (a)
            {
            case 1:    //Default Synthetic
                SyntheticData.SyntheticStudents(CodingBootcamp);
                SyntheticData.SyntheticAssignments(CodingBootcamp);
                SyntheticData.SyntheticTeachers(CodingBootcamp);
                SyntheticData.SyntheticCourses(CodingBootcamp);
                SyntheticData.SyntheticStudentsAssignments(CodingBootcamp);
                SyntheticData.SyntheticStudentsCourses(CodingBootcamp);
                SyntheticData.SyntheticTrainersCourses(CodingBootcamp);
                break;

            case 2:    //Manual Synthrtic
                Console.WriteLine("Set Number Of Students: ");
                SyntheticData.SyntheticStudents(CodingBootcamp, Convert.ToInt32(Console.ReadLine()));
                Console.WriteLine("Set Number Of Trainers: ");
                SyntheticData.SyntheticTeachers(CodingBootcamp, Convert.ToInt32(Console.ReadLine()));
                Console.WriteLine("Set Number Of Courses: ");
                SyntheticData.SyntheticCourses(CodingBootcamp, Convert.ToInt32(Console.ReadLine()));
                Console.WriteLine("Set Number Of Assigments: ");
                SyntheticData.SyntheticAssignments(CodingBootcamp, Convert.ToInt32(Console.ReadLine()));
                break;

            case 3:    //Continue to Programm
                break;

            default:
                Console.Write("Please Use The Correct # From Menu: ");
                break;
            }
        }
Example #23
0
 public static void SyntheticStudentsCourses(PrivateSchool CodingBootcamp)
 {
     CodingBootcamp.TrainersCourses.Add(new TrainersCourse(1, 1));
     CodingBootcamp.TrainersCourses.Add(new TrainersCourse(2, 2));
 }
Example #24
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);
        }
Example #25
0
        static void set_assignment_week(PrivateSchool CodingBootcamp)
        {
            string[] DaysOfWeek = new string[] { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" };
            DateTime date       = CommonTools.DateSearchAssignmentInput();

            int Mon_poss, Sun_poss, Month_Possition_1, Month_Possition_2, Year_Possition_1, Year_Possition_2;

            for (int i = 0; i < 7; i++)
            {
                if (Convert.ToString(date.DayOfWeek) == DaysOfWeek[i])
                {
                    Mon_poss = i;
                    Mon_poss = Mon_poss - 6;
                    Mon_poss = Math.Abs(Mon_poss);
                    Mon_poss = Mon_poss - 6;


                    Sun_poss = i;
                    Sun_poss = 6 - Sun_poss;

                    if (date.Day + Mon_poss <= 0)
                    {
                        if ((date.Month == 4 || date.Month == 6 || date.Month == 9 || date.Month == 11))
                        {
                            Mon_poss          = 30 + (date.Day + Mon_poss);
                            Month_Possition_1 = (date.Month == 1) ?  12 : date.Month - 1;
                            Year_Possition_1  = (Month_Possition_1 == 12) ? date.Year - 1 : date.Year;
                        }
                        else
                        {
                            Mon_poss          = 31 + (date.Day + Mon_poss);
                            Month_Possition_1 = (date.Month == 1) ? 12 : date.Month - 1;
                            Year_Possition_1  = (Month_Possition_1 == 12) ? date.Year - 1 : date.Year;
                        }
                    }
                    else
                    {
                        Mon_poss          = date.Day + Mon_poss;
                        Month_Possition_1 = date.Month;
                        Year_Possition_1  = date.Year;
                    }


                    if ((date.Month == 4 || date.Month == 6 || date.Month == 9 || date.Month == 11))
                    {
                        if (date.Day + Sun_poss > 30)
                        {
                            Sun_poss          = (date.Day + Sun_poss) - 30;
                            Month_Possition_2 = (date.Month == 12) ? 1 : date.Month + 1;
                            Year_Possition_2  = (Month_Possition_1 == 1) ? date.Year + 1 : date.Year;
                        }
                        else
                        {
                            Sun_poss          = date.Day + Sun_poss;
                            Month_Possition_2 = date.Month;
                            Year_Possition_2  = date.Year;
                        }
                    }
                    else
                    {
                        if (date.Day + Sun_poss > 31)
                        {
                            Sun_poss          = (date.Day + Sun_poss) - 31;
                            Month_Possition_2 = (date.Month == 12) ? 1 : date.Month + 1;
                            Year_Possition_2  = (Month_Possition_1 == 1) ? date.Year + 1 : date.Year;
                        }
                        else
                        {
                            Sun_poss          = date.Day + Sun_poss;
                            Month_Possition_2 = date.Month;
                            Year_Possition_2  = date.Year;
                        }
                    }


                    DateTime Monday = new DateTime(Year_Possition_1, Month_Possition_1, Mon_poss);
                    Console.WriteLine();
                    DateTime Sunday = new DateTime(Year_Possition_2, Month_Possition_2, Sun_poss);

                    Console.WriteLine($"\n\n\nWill Bring Assignments to be Submited on Week Days \n\n\tStrarting {Monday.ToString("dd/MM/yyyy")} throu {Sunday.ToString("dd/MM/yyyy")}");
                    Console.WriteLine("Example: 01/01/2019");
                    CodingBootcamp.OutputSubmitedAssignments(Monday, Sunday);
                }
            }
        }