Example #1
0
        public static List <TrainPerCourse> CreateListsTrainersPerCourse() // CREATE LIST, TRAINERS per COURSE______________________________________
        {
            List <Trainer> Trainers = ListProvider.CreateListsTrainers();
            List <Course>  Mathima  = ListProvider.CreateListCourses();

            TrainPerCourse TPC001 = new TrainPerCourse(Mathima, Trainers);

            List <TrainPerCourse> trainerspercourse = new List <TrainPerCourse>();

            trainerspercourse.Add(TPC001);

            return(trainerspercourse);
        }
        public static List <AssPerCourse> CreateListsAssPerCourse() // CREATE LIST, ASSIGNMENTS per COURSE______________________________________
        {
            List <Assignment> Assignments = ListProvider.CreateListAssignments();
            List <Course>     Mathima     = ListProvider.CreateListCourses();

            AssPerCourse APC001 = new AssPerCourse(Mathima, Assignments);

            List <AssPerCourse> asignemntspermathima = new List <AssPerCourse>();

            asignemntspermathima.Add(APC001);

            return(asignemntspermathima);
        }
Example #3
0
        public static List <StudPerCourse> CreateListsStudentsPerCourse() // CREATE LIST, STUDENTS per COURSE______________________________________
        {
            List <Student> Mathites = ListProvider.CreateListsStudents();
            List <Course>  Mathima  = ListProvider.CreateListCourses();

            StudPerCourse SPC001 = new StudPerCourse(Mathima, Mathites);

            List <StudPerCourse> studentspermathima = new List <StudPerCourse>();

            studentspermathima.Add(SPC001);

            return(studentspermathima);
        }
        public static List <AssPerStudent> CreateListsAssPerStudents() // CREATE LIST, ASSIGNMENTS per STUDENTS_____________________________________
        {
            List <Assignment> Assignments = ListProvider.CreateListAssignments();
            List <Student>    Students    = ListProvider.CreateListsStudents();


            AssPerStudent APS001 = new AssPerStudent(Students, Assignments);

            List <AssPerStudent> asignemntsperstudent = new List <AssPerStudent>();

            asignemntsperstudent.Add(APS001);

            return(asignemntsperstudent);
        }
Example #5
0
        public static void PrintListStudents()
        {
            // Output STUDENTS List______________________________________________________________________
            List <Student> students = new List <Student>();

            students = ListProvider.CreateListsStudents();

            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine("-----------------------------------------------------------------------------------------");
            Console.WriteLine($" {"STUDENTS NAME",-15} {" ", -15} | {"SUBJECT",-10} | {"START DATE",-12} | {"TUITION FEES"} ");
            Console.WriteLine("-----------------------------------------------------------------------------------------");
            Console.ForegroundColor = ConsoleColor.White;
            foreach (var item in students)
            {
                item.Output();
            }
            //-------------------------------------------------------------------------------------------
        }
Example #6
0
        public static void PrintListTrainers()
        {
            // Output TRAINERS List______________________________________________________________________
            List <Trainer> trainers = new List <Trainer>();

            trainers = ListProvider.CreateListsTrainers();

            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine("-----------------------------------------------------------------------------------------");
            Console.WriteLine($" {"TRAINERS NAME",-15} {" ",-15} | {"SUBJECT"}");
            Console.WriteLine("-----------------------------------------------------------------------------------------");
            Console.ForegroundColor = ConsoleColor.White;
            foreach (var item in trainers)
            {
                item.Output();
            }
            //-------------------------------------------------------------------------------------------
        }
Example #7
0
        public static void PrintListAssignments()
        {
            // Output ASSIGNEMENTS List__________________________________________________________________
            List <Assignment> listAss = new List <Assignment>();

            listAss = ListProvider.CreateListAssignments();

            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine("-----------------------------------------------------------------------------------------");
            Console.WriteLine($" {"TITLE",-10} |{"DESCRIPTION",-30} | {"SUBMISSION",-12} | {"ORAL",-6} | {"TOTAL"}");
            Console.WriteLine("-----------------------------------------------------------------------------------------");
            Console.ForegroundColor = ConsoleColor.White;
            foreach (var item in listAss)
            {
                item.Output();
            }
            //-------------------------------------------------------------------------------------------
        }
Example #8
0
        public static void PrintListCourses()
        {
            // Output COURSE List________________________________________________________________________
            List <Course> listcourse = new List <Course>();

            listcourse = ListProvider.CreateListCourses();

            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine("-----------------------------------------------------------------------------------------");
            Console.WriteLine($" {"TITLE",-15} | {"STREAM",-15} | {"TYPE",-10} | {"START DATE",-12} | {"END DATE"}");
            Console.WriteLine("-----------------------------------------------------------------------------------------");
            Console.ForegroundColor = ConsoleColor.White;
            foreach (var item in listcourse)
            {
                item.Output();
            }
            //-------------------------------------------------------------------------------------------
        }
        public static void Submissions(string date) // ASSIGNMENTS per STUDENTS PRINT (DATE CHECK)______________________________________
        {
            List <Assignment>    Assignments = ListProvider.CreateListAssignments();
            List <AssPerStudent> ApS         = new List <AssPerStudent>();

            ApS = AssPerStudent.CreateListsAssPerStudents();

            foreach (var item in ApS[0].Students)
            {
                item.Output();

                foreach (var ass in ApS[0].Assignments)
                {
                    if (ass.Title == item.Subject && ass.subDateTime.ToString("dd/MM/yyyy") == date)
                    {
                        ass.Output();
                    }
                }
            }
        }
        public static void CourseCheck()
        {
            List <Student> students = ListProvider.CreateListsStudents();

            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine("-----------------------------------------------------------------------------------------");
            Console.WriteLine($"STUDENTS IN MORE THAN ONE COURSES");
            Console.WriteLine("-----------------------------------------------------------------------------------------");
            Console.ForegroundColor = ConsoleColor.White;

            for (int i = 0; i < students.Count; i++)
            {
                for (int j = i + 1; j < students.Count; j++)
                {
                    if (students[i].Name == students[j].Name && students[i].Subject != students[j].Subject)
                    {
                        Console.ForegroundColor = ConsoleColor.Green;
                        Console.WriteLine($" {students[i].Name,-10} {students[i].LastName, -15} | 1) {students[i].Subject, -8} | 2) {students[j].Subject,-8}");
                        Console.WriteLine("-----------------------------------------------------------------------------------------");
                        Console.ForegroundColor = ConsoleColor.White;
                    }
                }
            }
        }
        public static void UserInput()
        {
            string e         = "E";
            string i         = "I";
            string userInput = null;

            List <Course> courses = ListProvider.CreateListCourses();

            while (userInput != e)
            {
                Console.WriteLine("\nChoose Action: \n(I) INPUT DATA, \n(E) BACK ");
                userInput = Console.ReadLine();
                if (userInput == i)
                {
                    string   tempTitle  = "Unspecified";
                    string   tempStream = "Unspecified";
                    string   tempType   = "Unspecified";
                    DateTime tempSDate  = new DateTime(2019, 1, 1);
                    DateTime tempEDate  = new DateTime(2019, 3, 31);


                    // Input Set Up__________________________________________________
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.WriteLine("Please Input Course Data");
                    Console.ForegroundColor = ConsoleColor.White;

                    // Input NAME_____________________________________________________
                    string tempTitle0;
                    Console.Write("Title:            ");
                    tempTitle0 = Console.ReadLine();
                    if (tempTitle0 == null)
                    {
                        tempTitle = "Unspecified";
                    }
                    tempTitle = tempTitle0;

                    // Input SURNAME__________________________________________________
                    string tempStream0;
                    Console.Write("Stream:         ");
                    tempStream0 = Console.ReadLine();
                    if (tempStream0 == null)
                    {
                        tempStream = "Unspecified";
                    }
                    tempStream = tempStream0;

                    // Input SUBJECT__________________________________________________
                    string tempType0;
                    Console.Write("Type:         ");
                    tempType0 = Console.ReadLine();
                    if (tempType0 == null)
                    {
                        tempType = "Unspecified";
                    }
                    tempType = tempType0;

                    // Input START DATE_______________________________________________
                    try
                    {
                        Console.WriteLine("Starting Date (DD/MM/YYYY): ");
                        string   Check     = Console.ReadLine();
                        DateTime DateCheck = DateTime.ParseExact(Check, "dd/MM/yyyy", CultureInfo.InvariantCulture);
                        tempSDate = DateCheck;
                    }
                    catch (Exception)
                    {
                        Console.ForegroundColor = ConsoleColor.Red;
                        Console.WriteLine("Your Given Date has Bad Format, Please input: (DD/MM/YYYY)");
                        Console.ForegroundColor = ConsoleColor.White;
                    }

                    // Input END DATE_______________________________________________
                    try
                    {
                        Console.WriteLine("End Date (DD/MM/YYYY): ");
                        string   Check     = Console.ReadLine();
                        DateTime DateCheck = DateTime.ParseExact(Check, "dd/MM/yyyy", CultureInfo.InvariantCulture);
                        tempEDate = DateCheck;
                    }
                    catch (Exception)
                    {
                        Console.ForegroundColor = ConsoleColor.Red;
                        Console.WriteLine("Your Given Date has Bad Format, Please input: (DD/MM/YYYY)");
                        Console.ForegroundColor = ConsoleColor.White;
                    }

                    Course temp = new Course(tempTitle, tempStream, tempType, tempSDate, tempEDate);
                    courses.Add(temp);

                    foreach (var item in courses)
                    {
                        item.Output();
                    }
                }
                else if (userInput == e)                                    // Step Back Command
                {
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine("BACK");
                    Console.ForegroundColor = ConsoleColor.White;
                }
                else                                                        // In the Case of false Data Input
                {
                    Console.ForegroundColor = ConsoleColor.DarkRed;
                    Console.WriteLine("Unindentified Input, Please Choose Again");
                    Console.ForegroundColor = ConsoleColor.White;
                }
            }
        }
Example #12
0
        public static void UserInput()
        {
            string e         = "E";
            string i         = "I";
            string userInput = null;

            List <Trainer> trainers = ListProvider.CreateListsTrainers();

            while (userInput != e)
            {
                Console.WriteLine("\nChoose Action: \n(I) INPUT DATA, \n(E) BACK ");
                userInput = Console.ReadLine();
                if (userInput == i)
                {
                    string tempName    = "Anonimos";
                    string tempSurname = "Anonimopoulos";
                    string tempSubject = "Unspecified";

                    // Input Set Up__________________________________________________
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.WriteLine("Please Input Trainer Data");
                    Console.ForegroundColor = ConsoleColor.White;

                    // Input NAME_____________________________________________________
                    string tempName0;
                    Console.Write("Name:            ");
                    tempName0 = Console.ReadLine();
                    if (tempName0 == null)
                    {
                        tempName = "Anonimos";
                    }
                    tempName = tempName0;

                    // Input SURNAME__________________________________________________
                    string tempSurname0;
                    Console.Write("SurName:         ");
                    tempSurname0 = Console.ReadLine();
                    if (tempSurname0 == null)
                    {
                        tempSurname = "Anonimopoulos";
                    }
                    tempSurname = tempSurname0;

                    // Input SUBJECT__________________________________________________
                    string tempSubject0;
                    Console.Write("Subject:         ");
                    tempSubject0 = Console.ReadLine();
                    if (tempSubject0 == null)
                    {
                        tempSubject = "Unspecified";
                    }
                    tempSubject = tempSubject0;



                    Trainer temp = new Trainer(tempName, tempSurname, tempSubject);
                    trainers.Add(temp);

                    foreach (var item in trainers)
                    {
                        item.Output();
                    }
                }
                else if (userInput == e)                                    // Step Back Command
                {
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine("BACK");
                    Console.ForegroundColor = ConsoleColor.White;
                }
                else                                                        // In the Case of false Data Input
                {
                    Console.ForegroundColor = ConsoleColor.DarkRed;
                    Console.WriteLine("Unindentified Input, Please Choose Again");
                    Console.ForegroundColor = ConsoleColor.White;
                }
            }
        }
        public static void UserInput()
        {
            string e         = "E";
            string i         = "I";
            string userInput = null;

            List <Student> students = ListProvider.CreateListsStudents();

            while (userInput != e)
            {
                Console.WriteLine("\nChoose Action: \n(I) INPUT DATA, \n(E) BACK ");
                userInput = Console.ReadLine();
                if (userInput == i)
                {
                    string   tempName    = "Anonimos";
                    string   tempSurname = "Anonimopoulos";
                    string   tempSubject = "Unspecified";
                    DateTime tempDate    = DateTime.Now;
                    int      tempFees    = 2500;

                    // Input Set Up__________________________________________________
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.WriteLine("Please Input Student Data");
                    Console.ForegroundColor = ConsoleColor.White;

                    // Input NAME_____________________________________________________
                    string tempName0;
                    Console.Write("Name:            ");
                    tempName0 = Console.ReadLine();
                    if (tempName0 == null)
                    {
                        tempName = "Anonimos";
                    }
                    tempName = tempName0;

                    // Input SURNAME__________________________________________________
                    string tempSurname0;
                    Console.Write("SurName:         ");
                    tempSurname0 = Console.ReadLine();
                    if (tempSurname0 == null)
                    {
                        tempSurname = "Anonimopoulos";
                    }
                    tempSurname = tempSurname0;

                    // Input SUBJECT__________________________________________________
                    string tempSubject0;
                    Console.Write("Subject:         ");
                    tempSubject0 = Console.ReadLine();
                    if (tempSubject0 == null)
                    {
                        tempSubject = "Unspecified";
                    }
                    tempSubject = tempSubject0;

                    // Input START DATE_______________________________________________
                    try
                    {
                        Console.WriteLine("Starting Date (DD/MM/YYYY): ");
                        string   Check     = Console.ReadLine();
                        DateTime DateCheck = DateTime.ParseExact(Check, "dd/MM/yyyy", CultureInfo.InvariantCulture);
                        tempDate = DateCheck;
                    }
                    catch (Exception)
                    {
                        Console.ForegroundColor = ConsoleColor.Red;
                        Console.WriteLine("Your Given Date has Bad Format, Please input: (DD/MM/YYYY)");
                        Console.ForegroundColor = ConsoleColor.White;
                    }

                    // Input TUITION FEES_____________________________________________
                    try
                    {
                        Console.Write("Tuition Fees:    ");
                        tempFees = Int32.Parse(Console.ReadLine());
                        if (tempFees <= 0)
                        {
                            tempFees = 2500;
                        }
                    }
                    catch (Exception)
                    {
                        Console.ForegroundColor = ConsoleColor.Red;
                        Console.WriteLine("Fees must be a Number, Please Input a Number");
                        Console.ForegroundColor = ConsoleColor.White;
                    }

                    Student temp = new Student(tempName, tempSurname, tempSubject, tempDate, tempFees);
                    students.Add(temp);

                    foreach (var item in students)
                    {
                        item.Output();
                    }
                }
                else if (userInput == e)                                    // Step Back Command
                {
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine("BACK");
                    Console.ForegroundColor = ConsoleColor.White;
                }
                else                                                        // In the Case of false Data Input
                {
                    Console.ForegroundColor = ConsoleColor.DarkRed;
                    Console.WriteLine("Unindentified Input, Please Choose Again");
                    Console.ForegroundColor = ConsoleColor.White;
                }
            }
        }
Example #14
0
        public static void DateCheckAss()
        {
            string            GivenDate   = "01/01/2019";
            List <Assignment> Assignments = ListProvider.CreateListAssignments();

            // USER DATE___________________________________________________________________________________________________________________________
            try
            {
                Console.WriteLine("Input Date in this Format (DD/MM/YYYY): ");
                GivenDate = Console.ReadLine();
                DateTime DateCheck = DateTime.ParseExact(GivenDate, "dd/MM/yyyy", CultureInfo.InvariantCulture);
            }
            catch (Exception)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("Your Given Date has Bad Format, Please input: (DD/MM/YYYY)");
                Console.ForegroundColor = ConsoleColor.White;
            }
            DateTime DateConv = DateTime.ParseExact(GivenDate, "dd/MM/yyyy", CultureInfo.InvariantCulture);

            // ASSIGNMENTS DUE DATES_______________________________________________________________________________________________________________


            DateTime temDate  = new DateTime(2019, 1, 1);
            string   tempD    = temDate.ToString("dd/MM/yyyy");
            DateTime temDate0 = DateTime.ParseExact(tempD, "dd/MM/yyyy", CultureInfo.InvariantCulture);

            DateTime temDate1 = DateTime.ParseExact(Assignments[0].subDateTime.ToString("dd/MM/yyyy"), "dd/MM/yyyy", CultureInfo.InvariantCulture);
            DateTime temDate2 = DateTime.ParseExact(Assignments[1].subDateTime.ToString("dd/MM/yyyy"), "dd/MM/yyyy", CultureInfo.InvariantCulture);
            DateTime temDate3 = DateTime.ParseExact(Assignments[2].subDateTime.ToString("dd/MM/yyyy"), "dd/MM/yyyy", CultureInfo.InvariantCulture);
            DateTime temDate4 = DateTime.ParseExact(Assignments[3].subDateTime.ToString("dd/MM/yyyy"), "dd/MM/yyyy", CultureInfo.InvariantCulture);
            DateTime temDate5 = DateTime.ParseExact(Assignments[4].subDateTime.ToString("dd/MM/yyyy"), "dd/MM/yyyy", CultureInfo.InvariantCulture);
            DateTime temDate6 = DateTime.ParseExact(Assignments[5].subDateTime.ToString("dd/MM/yyyy"), "dd/MM/yyyy", CultureInfo.InvariantCulture);

            if (DateConv <= temDate0)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("Your Given Date is Out of the Course Dates");
                Console.ForegroundColor = ConsoleColor.White;
            }
            else if (DateConv >= temDate0 && DateConv <= temDate1)
            {
                GivenDate = Assignments[0].subDateTime.ToString("dd/MM/yyyy");
                AssPerStudent.Submissions(GivenDate);
            }
            else if (DateConv >= temDate1 && DateConv <= temDate2)
            {
                GivenDate = Assignments[1].subDateTime.ToString("dd/MM/yyyy");
                AssPerStudent.Submissions(GivenDate);
            }
            else if (DateConv >= temDate2 && DateConv <= temDate3)
            {
                GivenDate = Assignments[2].subDateTime.ToString("dd/MM/yyyy");
                AssPerStudent.Submissions(GivenDate);
            }
            else if (DateConv >= temDate3 && DateConv <= temDate4)
            {
                GivenDate = Assignments[3].subDateTime.ToString("dd/MM/yyyy");
                AssPerStudent.Submissions(GivenDate);
            }
            else if (DateConv >= temDate4 && DateConv <= temDate5)
            {
                GivenDate = Assignments[4].subDateTime.ToString("dd/MM/yyyy");
                AssPerStudent.Submissions(GivenDate);
            }
            else if (DateConv >= temDate5 && DateConv <= temDate6)
            {
                GivenDate = Assignments[5].subDateTime.ToString("dd/MM/yyyy");
                AssPerStudent.Submissions(GivenDate);
            }
            else
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("Your Given Date is Out of the Assignments Submission Dates");
                Console.ForegroundColor = ConsoleColor.White;
            }
        }
Example #15
0
        public static void UserInput()
        {
            string e         = "E";
            string i         = "I";
            string userInput = null;

            List <Assignment> assigns = ListProvider.CreateListAssignments();

            while (userInput != e)
            {
                Console.WriteLine("\nChoose Action: \n(I) INPUT DATA, \n(E) BACK ");
                userInput = Console.ReadLine();
                if (userInput == i)
                {
                    string   tempTitle       = "Anonimos";
                    string   tempDescription = "Anonimopoulos";
                    DateTime tempDate        = DateTime.Now;
                    double   tempOmark       = 5;
                    double   tempmark        = 5;

                    // Input Set Up__________________________________________________
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.WriteLine("Please Input Assignment Data");
                    Console.ForegroundColor = ConsoleColor.White;

                    // Input NAME_____________________________________________________
                    string tempTitle0;
                    Console.Write("Title:            ");
                    tempTitle0 = Console.ReadLine();
                    if (tempTitle0 == null)
                    {
                        tempTitle = "Agnosto";
                    }
                    tempTitle = tempTitle0;

                    // Input SURNAME__________________________________________________
                    string tempDescriptione0;
                    Console.Write("Description:         ");
                    tempDescriptione0 = Console.ReadLine();
                    if (tempDescriptione0 == null)
                    {
                        tempDescription = "Agnoto kai auto";
                    }
                    tempDescription = tempDescriptione0;

                    // Input  DATE_______________________________________________
                    try
                    {
                        Console.WriteLine("Subscription Date (DD/MM/YYYY): ");
                        string   Check     = Console.ReadLine();
                        DateTime DateCheck = DateTime.ParseExact(Check, "dd/MM/yyyy", CultureInfo.InvariantCulture);
                        tempDate = DateCheck;
                    }
                    catch (Exception)
                    {
                        Console.ForegroundColor = ConsoleColor.Red;
                        Console.WriteLine("Your Given Date has Bad Format, Please input: (DD/MM/YYYY)");
                        Console.ForegroundColor = ConsoleColor.White;
                    }

                    // Input Oral Mark_____________________________________________
                    try
                    {
                        Console.Write("Oral Mark:    ");
                        tempOmark = double.Parse(Console.ReadLine());
                        if (tempOmark <= 0)
                        {
                            tempOmark = 0;
                        }
                    }
                    catch (Exception)
                    {
                        Console.ForegroundColor = ConsoleColor.Red;
                        Console.WriteLine("Mark must be a Number, Please Input a Number");
                        Console.ForegroundColor = ConsoleColor.White;
                    }

                    // Input Total Mark_____________________________________________
                    try
                    {
                        Console.Write("Total Mark:    ");
                        tempmark = double.Parse(Console.ReadLine());
                        if (tempmark <= 0)
                        {
                            tempmark = 0;
                        }
                    }
                    catch (Exception)
                    {
                        Console.ForegroundColor = ConsoleColor.Red;
                        Console.WriteLine("Mark must be a Number, Please Input a Number");
                        Console.ForegroundColor = ConsoleColor.White;
                    }

                    Assignment temp = new Assignment(tempTitle, tempDescription, tempDate, tempOmark, tempmark);
                    assigns.Add(temp);

                    foreach (var item in assigns)
                    {
                        item.Output();
                    }
                }
                else if (userInput == e)                                    // Step Back Command
                {
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine("BACK");
                    Console.ForegroundColor = ConsoleColor.White;
                }
                else                                                        // In the Case of false Data Input
                {
                    Console.ForegroundColor = ConsoleColor.DarkRed;
                    Console.WriteLine("Unindentified Input, Please Choose Again");
                    Console.ForegroundColor = ConsoleColor.White;
                }
            }
        }