Exemple #1
0
        static void Main(string[] args)
        {
            Trainer nikbank = new JuniorTrainer("Nikolay", "Bankin", 20);
            Trainer vGeorg  = new SeniorTrainer("Vlado", "Geogiev", 25);
            Trainer nakov   = new SeniorTrainer("Svetlin", "Nakov");
            Trainer aRus    = new JuniorTrainer("Atanas", "Rusenov", 18);

            Student toi    = new GraduateStudent("Zavyrshil", "Student", "80002341", (float)5.46, 34);
            Student blagoi = new GraduateStudent("Blago", "Peshev", "80002145", (float)5.22, 31);
            Student misho  = new GraduateStudent("Misho", "Mishev", "80004587", (float)5.96);

            Student pesho = new DropoutStudent("Pesho", "Peshev", "40001234", (float)2.33, "low result");
            Student katya = new DropoutStudent("Katya", "Ivanova", "40005678", (float)4.33, "family reasons");

            CurrentStudent valyo   = new OnlineStudent("Valentin", "Petrov", "50006541", (float)3.45, 23);
            CurrentStudent geca    = new OnlineStudent("Georgi", "Petrov", "50002389", (float)4.45, 28);
            CurrentStudent batkata = new OnsiteStudent("Botyo", "Botev", "50009841", (float)5.85, 23);

            List <Person> persons = new List <Person>()
            {
                nikbank, vGeorg, nakov, aRus, toi, blagoi, misho,
                pesho, katya, valyo, geca, batkata
            };


            persons.Where(p => p is CurrentStudent).OrderBy(p => ((Student)p).AverageGrade).ToList().ForEach(p => Console.WriteLine(p.ToString()));
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Trainer nikbank = new JuniorTrainer("Nikolay", "Bankin", 20);
            Trainer vGeorg = new SeniorTrainer("Vlado", "Geogiev", 25);
            Trainer nakov = new SeniorTrainer("Svetlin", "Nakov");
            Trainer aRus = new JuniorTrainer("Atanas", "Rusenov", 18);

            Student toi = new GraduateStudent("Zavyrshil", "Student", "80002341", (float)5.46, 34);
            Student blagoi = new GraduateStudent("Blago", "Peshev", "80002145", (float)5.22, 31);
            Student misho = new GraduateStudent("Misho", "Mishev", "80004587", (float)5.96);

            Student pesho = new DropoutStudent("Pesho", "Peshev", "40001234", (float)2.33, "low result");
            Student katya = new DropoutStudent("Katya", "Ivanova", "40005678", (float)4.33, "family reasons");

            CurrentStudent valyo = new OnlineStudent("Valentin", "Petrov", "50006541", (float)3.45, 23);
            CurrentStudent geca = new OnlineStudent("Georgi", "Petrov", "50002389", (float)4.45, 28);
            CurrentStudent batkata = new OnsiteStudent("Botyo", "Botev", "50009841", (float)5.85, 23);

            List<Person> persons = new List<Person>() { nikbank,vGeorg,nakov,aRus,toi, blagoi,misho,
                pesho, katya,valyo,geca,batkata};

            valyo.CurrentCourses.Add("JS Applications");
           
            persons.Where(p => p is CurrentStudent).OrderBy(p => ((Student)p).AverageGrade).ToList().ForEach(p => Console.WriteLine(p.ToString()));


        }
Exemple #3
0
        static void Main(string[] args)
        {
            JuniorTrainer   juniorTrainer1   = new JuniorTrainer("Pesho", "Peshov", 24);
            JuniorTrainer   juniorTrainer2   = new JuniorTrainer("GonlineStudentho", "GonlineStudentov", 27);
            JuniorTrainer   juniorTrainer3   = new JuniorTrainer("Vladko", "Vladov", 19);
            SeniorTrainer   seniorTrainer1   = new SeniorTrainer("Petko", "Petkov", 33);
            SeniorTrainer   seniorTrainer2   = new SeniorTrainer("Stefan", "Stefanov", 38);
            SeniorTrainer   seniorTrainer3   = new SeniorTrainer("Martin", "Martinov", 29);
            GraduateStudent graduateStudent1 = new GraduateStudent("Ivan", "Novakov", 30020925, 4.45M, 35);
            GraduateStudent graduateStudent2 = new GraduateStudent("RadonlineStudentlav", "Simeonov", 30058925, 5.80M, 28);
            GraduateStudent graduateStudent3 = new GraduateStudent("Teodor", "Stoychev", 300521345, 3.00M, 33);
            DropoutStudent  dropoutStudent1  = new DropoutStudent("Nakovalnq", "Nakovalnev", 30020925, 4.45M, "...", 35);
            DropoutStudent  dropoutStudent2  = new DropoutStudent("Mmmm", "IdropOut", 30058925, 5.80M, "I dropoutStudentn't care zzzZZZzzz...", 28);
            DropoutStudent  dropoutStudent3  = new DropoutStudent("Arnold", "Ill' be back", 300521345, 3.00M, "Terminated!!!", 33);
            OnlineStudent   onlineStudent1   = new OnlineStudent("Emil", "Stefanov", 40018512, 3.33M, "OOP", 48);
            OnlineStudent   onlineStudent2   = new OnlineStudent("Martin", "Todorov", 40065415, 5.45M, "OOP", 22);
            OnlineStudent   onlineStudent3   = new OnlineStudent("Valeri", "Zahariev", 40018525, 4.89M, "OOP", 18);
            OnsiteStudent   onsiteStudent1   = new OnsiteStudent("Natalya", "Alexandrova", 40089564, 4.00M, "OOP", 5, 31);
            OnsiteStudent   onsiteStudent2   = new OnsiteStudent("Adriyana", "Alexandrova", 40012188, 5.25M, "OOP", 5, 25);
            OnsiteStudent   onsiteStudent3   = new OnsiteStudent("Peter", "Simeonov", 40035698, 3.80M, "OOP", 3, 30);

            juniorTrainer1.CreateCourse("PHP Basics");
            seniorTrainer1.CreateCourse("Java Basics");
            seniorTrainer2.DeleteCourse("PHP Basics");
            dropoutStudent3.Reapply();

            List <Person> softUniPersons = new List <Person>
            {
                juniorTrainer1,
                juniorTrainer2,
                juniorTrainer3,
                seniorTrainer1,
                seniorTrainer2,
                seniorTrainer3,
                graduateStudent1,
                graduateStudent2,
                graduateStudent3,
                dropoutStudent1,
                dropoutStudent2,
                dropoutStudent3,
                onsiteStudent1,
                onsiteStudent2,
                onsiteStudent3,
                onlineStudent1,
                onlineStudent2,
                onlineStudent3
            };

            SULS testSoftUni = new SULS(softUniPersons);

            testSoftUni.ExtractCurrentStudents();
        }
Exemple #4
0
        static void Main(string[] args)
        {
            JuniorTrainer juniorTrainer1 = new JuniorTrainer("Pesho", "Peshov", 24);
            JuniorTrainer juniorTrainer2 = new JuniorTrainer("GonlineStudentho", "GonlineStudentov", 27);
            JuniorTrainer juniorTrainer3 = new JuniorTrainer("Vladko", "Vladov", 19);
            SeniorTrainer seniorTrainer1 = new SeniorTrainer("Petko", "Petkov", 33);
            SeniorTrainer seniorTrainer2 = new SeniorTrainer("Stefan", "Stefanov", 38);
            SeniorTrainer seniorTrainer3 = new SeniorTrainer("Martin", "Martinov", 29);
            GraduateStudent graduateStudent1 = new GraduateStudent("Ivan", "Novakov", 30020925, 4.45M, 35);
            GraduateStudent graduateStudent2 = new GraduateStudent("RadonlineStudentlav", "Simeonov", 30058925, 5.80M, 28);
            GraduateStudent graduateStudent3 = new GraduateStudent("Teodor", "Stoychev", 300521345, 3.00M, 33);
            DropoutStudent dropoutStudent1 = new DropoutStudent("Nakovalnq", "Nakovalnev", 30020925, 4.45M, "...", 35);
            DropoutStudent dropoutStudent2 = new DropoutStudent("Mmmm", "IdropOut", 30058925, 5.80M, "I dropoutStudentn't care zzzZZZzzz...", 28);
            DropoutStudent dropoutStudent3 = new DropoutStudent("Arnold", "Ill' be back", 300521345, 3.00M, "Terminated!!!", 33);
            OnlineStudent onlineStudent1 = new OnlineStudent("Emil", "Stefanov", 40018512, 3.33M, "OOP", 48);
            OnlineStudent onlineStudent2 = new OnlineStudent("Martin", "Todorov", 40065415, 5.45M, "OOP", 22);
            OnlineStudent onlineStudent3 = new OnlineStudent("Valeri", "Zahariev", 40018525, 4.89M, "OOP", 18);
            OnsiteStudent onsiteStudent1 = new OnsiteStudent("Natalya", "Alexandrova", 40089564, 4.00M, "OOP", 5, 31);
            OnsiteStudent onsiteStudent2 = new OnsiteStudent("Adriyana", "Alexandrova", 40012188, 5.25M, "OOP", 5, 25);
            OnsiteStudent onsiteStudent3 = new OnsiteStudent("Peter", "Simeonov", 40035698, 3.80M, "OOP", 3, 30);

            juniorTrainer1.CreateCourse("PHP Basics");
            seniorTrainer1.CreateCourse("Java Basics");
            seniorTrainer2.DeleteCourse("PHP Basics");
            dropoutStudent3.Reapply();

            List<Person> softUniPersons = new List<Person> 
            { 
                juniorTrainer1,
                juniorTrainer2,
                juniorTrainer3,
                seniorTrainer1,
                seniorTrainer2,
                seniorTrainer3,
                graduateStudent1,
                graduateStudent2,
                graduateStudent3,
                dropoutStudent1,
                dropoutStudent2,
                dropoutStudent3,
                onsiteStudent1,
                onsiteStudent2,
                onsiteStudent3,
                onlineStudent1,
                onlineStudent2,
                onlineStudent3 
            };

            SULS testSoftUni = new SULS(softUniPersons);
            testSoftUni.ExtractCurrentStudents();
        }
Exemple #5
0
        public static void Main(string[] args)
        {

            Trainer nakov = new SeniorTrainer("Svetlin", "Nakov");
            Student mashina = new GraduateStudent("Boiko", "Borisov", "80002341", 6.00, 34);
            Student bot = new DropoutStudent("Bot", "Student", "400235678", 2.33, "Bot e");

            CurrentStudent letec = new OnlineStudent("Letec", "Letqsht", "50006541", 3.45, "OOP");
            CurrentStudent rita = new OnlineStudent("Rita", "Topka", "50002389", 4.45, "OOP");
            CurrentStudent batkata = new OnsiteStudent("Liubo", "Penev", "50009841", 5.85, "OOP",5);

            List<Person> persons = new List<Person>() { nakov, mashina, bot, letec, rita, batkata};
            persons.Where(p => p is CurrentStudent).OrderBy(p => ((Student)p).AvgGrade).ToList().ForEach(p => Console.WriteLine(p.ToString()));
        }
Exemple #6
0
        public static void Main(string[] args)
        {
            Trainer nakov   = new SeniorTrainer("Svetlin", "Nakov");
            Student mashina = new GraduateStudent("Boiko", "Borisov", "80002341", 6.00, 34);
            Student bot     = new DropoutStudent("Bot", "Student", "400235678", 2.33, "Bot e");

            CurrentStudent letec   = new OnlineStudent("Letec", "Letqsht", "50006541", 3.45, "OOP");
            CurrentStudent rita    = new OnlineStudent("Rita", "Topka", "50002389", 4.45, "OOP");
            CurrentStudent batkata = new OnsiteStudent("Liubo", "Penev", "50009841", 5.85, "OOP", 5);

            List <Person> persons = new List <Person>()
            {
                nakov, mashina, bot, letec, rita, batkata
            };

            persons.Where(p => p is CurrentStudent).OrderBy(p => ((Student)p).AvgGrade).ToList().ForEach(p => Console.WriteLine(p.ToString()));
        }