static void Main()
        {
            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", 35, "30020925", 4.45f);
            GraduateStudent graduateStudent2 = new GraduateStudent("RadonlineStudentlav", "Simeonov", 28, "30058925", 5.80f);
            GraduateStudent graduateStudent3 = new GraduateStudent("Teodor", "Stoychev", 33, "300521345", 3.00f);
            DropoutStudent dropoutStudent1 = new DropoutStudent("Nakovalnq", "Nakovalnev", 35, "30020925", 4.45f, "...");
            DropoutStudent dropoutStudent2 = new DropoutStudent("Mmmm", "IdropOut", 28, "30058925", 5.80f, "I dropoutStudentn't care zzzZZZzzz...");
            DropoutStudent dropoutStudent3 = new DropoutStudent("Arnold", "Ill' be back", 33, "300521345", 3.00f, "Terminated!!!");
            OnlineStudent onlineStudent1 = new OnlineStudent("Emil", "Stefanov", 48, "40018512", 3.33f, "OOP");
            OnlineStudent onlineStudent2 = new OnlineStudent("Martin", "Todorov", 22, "40065415", 5.45f, "OOP");
            OnlineStudent onlineStudent3 = new OnlineStudent("Valeri", "Zahariev", 18, "40018525", 4.89f, "OOP");
            OnsiteStudent onsiteStudent1 = new OnsiteStudent("Natalya", "Alexandrova", 31, "40089564", 4.00f, "OOP", 5);
            OnsiteStudent onsiteStudent2 = new OnsiteStudent("Adriyana", "Alexandrova", 25, "40012188", 5.25f, "OOP", 5);
            OnsiteStudent onsiteStudent3 = new OnsiteStudent("Peter", "Simeonov", 30, "40035698", 3.80f, "OOP", 3);

            juniorTrainer1.CreateCourse("Drink brave!");
            seniorTrainer1.CreateCourse("I'm alive!");
            seniorTrainer2.DeleteCourse("Drink brave!");
            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 #2
0
        static void Main()
        {
            var nikbank = new JuniorTrainer("Nikolay", "Bankin", "8080808080");
            var vKaranf = new SeniorTrainer("Vlado", "Karnfilov", "7070807070");

            Console.WriteLine(nikbank);
            Console.WriteLine(vKaranf);

            nikbank.CreateCourse("OOP");
            vKaranf.CreateCourse("C# Part:2");
            vKaranf.DeleteCourse("C# Part:2");
            Console.WriteLine(new string('*', Console.WindowWidth));

            var student1 = new GradulateStudent("Gosho", "Loshov", "1234567890", 34, 5.60);
            var student2 = new GradulateStudent("Pesho", "Poshov", "1234567890", 12, 3.60);
            var student3 = new GradulateStudent("Mari", "Markova", "1234567890", 1, 4.20);

            var student13 = new DropoutStudent("Niki", "Nikov", "1234567890", 4, 2.00, "low result");
            var student14 = new DropoutStudent("Mari", "Markova", "1234567890", 1, 4.20, "family reason");

            var student11 = new OnlineStudent("Mitko", "Mitkov", "1234567890", 2, 2.60);
            var student21 = new OnsiteStudent("Goro", "Gororv", "1234567890", 2, 5.66);

            student21.Visits = 23;
            var persons = new HashSet <Person>()
            {
                nikbank,
                vKaranf,
                student1,
                student1,
                student11,
                student13,
                student14,
                student2,
                student3,
                student21
            };

            student11.CurrentCourses.Add("C# Part 1");

            var selectedStudents = from person in persons
                                   where person is CurrentStudent
                                   orderby((Student)person).AverageGrade descending
                                   select person;

            foreach (var student in selectedStudents)
            {
                Console.WriteLine(student);
            }
        }
Exemple #3
0
        static void Main(string[] args)
        {
            Student az = new OnlineStudent("Pavel", "Ilchev", 33, 555678, 6.00, "OOP");
            Student ross = new OnlineStudent("Rossen", "Filipov", 30, 435678, 5.80, "OOP");
            Student flik = new OnsiteStudent("Flick", "Flickev", 25, 123678, 5.90, "KPK", 10);
            Student ron = new OnsiteStudent("Rony", "Kouman", 35, 666678, 3.00, "Basic", 1);
            Student dropi = new DropoutStudent("Dropi", "Dropev", 35, 666678, 3.00, "slab uspeh");
            Student outi = new GraduateStudent("Outi", "Outev", 35, 666678, 3.00);

            List<Student> persons = new List<Student>();
            persons.Add(az);
            persons.Add(ross);
            persons.Add(flik);
            persons.Add(ron);
            persons.Add(dropi);
            persons.Add(outi);

            persons.Where(x => x is CurrentStudent).OrderBy(x => x.AverageGrade).ToList().ForEach(y => System.Console.WriteLine(y));
        }
Exemple #4
0
        static void Main(string[] args)
        {
            Student az    = new OnlineStudent("Pavel", "Ilchev", 33, 555678, 6.00, "OOP");
            Student ross  = new OnlineStudent("Rossen", "Filipov", 30, 435678, 5.80, "OOP");
            Student flik  = new OnsiteStudent("Flick", "Flickev", 25, 123678, 5.90, "KPK", 10);
            Student ron   = new OnsiteStudent("Rony", "Kouman", 35, 666678, 3.00, "Basic", 1);
            Student dropi = new DropoutStudent("Dropi", "Dropev", 35, 666678, 3.00, "slab uspeh");
            Student outi  = new GraduateStudent("Outi", "Outev", 35, 666678, 3.00);

            List <Student> persons = new List <Student>();

            persons.Add(az);
            persons.Add(ross);
            persons.Add(flik);
            persons.Add(ron);
            persons.Add(dropi);
            persons.Add(outi);

            persons.Where(x => x is CurrentStudent).OrderBy(x => x.AverageGrade).ToList().ForEach(y => System.Console.WriteLine(y));
        }