static void Main(string[] args) { Student student1 = new Student("Andrew Kostenko"); Student student2 = new Student("Julia Veselkina"); Student student3 = new Student("Maria Perechrest"); student1.SetKnowledge(new Knowledge(7)); student2.SetKnowledge(new Knowledge(4)); student3.SetKnowledge(new Knowledge(10)); University university = new University("CH.U.I"); university.AddStudent(student1); university.AddStudent(student2); university.AddStudent(student3); Internship internship = new Internship("Interlink"); internship.AddStudents(university.GetStudentsToInternship()); Console.WriteLine("Students added to internship:"); Console.WriteLine(internship.GetStudents()); Console.ReadKey(); }
static void Main(string[] args) { University university = new University("CH.U.I.", new FakeStudentsRepository().GetAll().ToList()); Internship internship = new Internship("Interlink", university); Console.WriteLine("List of internship's students:"); Console.WriteLine(internship.GetStudents()); Console.ReadKey(); }
static void Main(string[] args) { University university = new University("CH.U.I."); university.AddStudents(mockStudent()); Internship internship = new Internship("Interlink"); internship.setStudents(university.getSmartStudents()); Console.WriteLine("List of internship's students:"); Console.WriteLine(internship.GetStudents()); }
static void Main(string[] args) { var s = new Student("Alex"); University university = new University("CH.U.I."); university.AddStudent(new Student("Andrew Kostenko", new Knowledge(5))); university.AddStudent(new Student("Julia Veselkina", 5)); university.AddStudent(new Student("Maria Perechrest", 3)); Internship internship = new Internship("Interlink"); internship.CreatingListOfIntern(university); Console.WriteLine("List of internship's students:"); Console.WriteLine(internship.GetStudents()); Console.ReadKey(); }
static void Main(string[] args) { StudentRepository repository = new StudentRepository(new IStudentSource()); List <Student> students = repository.getStudents(); University university = new University("CH.U.I."); university.SetStudents(students); Internship internship = new Internship("Interlink"); internship.AddUniversity(university); internship.SetStudents(); Console.WriteLine("List of internship's students:"); Console.WriteLine(internship.GetStudents()); }
static void Main(string[] args) { var s = new Student("Alex"); University university = new University("CH.U.I."); university.AddStudent(new Student("Andrew Kostenko")); university.AddStudent(new Student("Julia Veselkina")); university.AddStudent(new Student("Maria Perechrest")); Internship internship = new Internship("Interlink"); //internship.FormInterns(university); Console.WriteLine("List of internship's students:"); Console.WriteLine(internship.GetStudents()); Console.ReadLine(); }
private static void Main(string[] args) { // read students List <Student> students = GetStudents(); var university = new University("CH.U.I."); // add students to university university.AddStudents(students); // create intership for university var internship = new Internship("Interlink", university); Console.WriteLine("List of internship's students:"); Console.WriteLine(internship.GetStudents()); Console.ReadKey(); }
static void Main(string[] args) { var s = new Student("Alex"); s.SetKnowledge(new Knowledge(4)); University university = new University("CH.U.I."); university.AddStudent(s); university.AddStudent(new Student("Andrew Kostenko", new Knowledge(2))); university.AddStudent(new Student("Julia Veselkina", new Knowledge(2))); university.AddStudent(new Student("Maria Perechrest", new Knowledge(5))); Internship internship = new Internship("Interlink"); internship.SelectStudentsFromUniversity(university); Console.WriteLine("List of internship's students:"); Console.WriteLine(internship.GetStudents()); }
static void Main(string[] args) { University university = new University("CH.U.I."); university.AddStudent(new Student("Andrew Kostenko")); university.AddStudent(new Student("Julia Veselkina")); university.AddStudent(new Student("Maria Perechrest")); university.AddStudent(new Student("Ivan Ivanov")); for (int i = 0; i < university._Students.Count; i++) { Console.WriteLine(university[i] + " level of knowledge (0 - 100): "); university[i].SetKnowledge(new Knowledge(Convert.ToInt32(Console.ReadLine()))); } Internship internship = new Internship("Interlink", university); Console.WriteLine("List of internship's students:"); Console.WriteLine(internship.GetStudents()); Console.ReadKey(); }
static void Main(string[] args) { Student student1 = new Student("Alex Vitrov", new Knowledge(10.2)); Student student2 = new Student("Julia Veselkina", new Knowledge(9.8)); Student student3 = new Student("Maria Perechrest", new Knowledge(10.1)); University university = new University("CH.U.I."); university.AddStudent(student1); university.AddStudent(student2); university.AddStudent(student3); Internship internship = new Internship("Interlink"); internship.AddStudents(university); Console.WriteLine("List of internship's students:"); Console.WriteLine(internship.GetStudents()); }
static void Main(string[] args) { var s = new Student("Alex", new Knowledge(5)); University university = new University("CH.U.I."); university.AddStudent(new Student("Andrew Kostenko", new Knowledge(4))); university.AddStudent(new Student("Julia Veselkina")); university.AddStudent(new Student("Maria Perechrest")); university.AddStudent(s); Internship internship = new Internship("Interlink"); //internship.AddStudents(university.Students); internship.AddStudentsFromOtherEducPlace(university); // поліморфізм Console.WriteLine("List of internship's students:"); Console.WriteLine(internship.GetStudents()); }
static void Main(string[] args) { //var s = new Student("Alex"); //IStrategy strategy = new GetStudentsFromDB(); //University university = new University("CH.U.I."); //university.Strategy = strategy; //university.AddStudent(); University university = new University("CH.U.I."); university.AddStudent(new Student("Andrew Kostenko", new Knowledge(1111))); university.AddStudent(new Student("Julia Veselkina", new Knowledge(160))); university.AddStudent(new Student("Maria Perechrest", new Knowledge(180))); university.AddStudent(new Student("Alex", new Knowledge(180))); Internship internship = new Internship("Interlink"); internship.AddUniversity(university); Console.WriteLine("List of internship's students:"); Console.WriteLine(internship.GetStudents()); }
static void Main(string[] args) { var s = new Student("Alex"); s.SetKnowledge(new Knowledge(5)); University university = new University("CH.U.I."); University universityWithoutStudents = new University("Sad university"); university.AddStudent(new Student("Andrew Kostenko", new Knowledge(5))); university.AddStudent(new Student("Julia Veselkina", new Knowledge(4))); university.AddStudent(new Student("Maria Perechrest", new Knowledge(3))); university.AddStudent(new Student("Roma Danilyk", new Knowledge(4))); university.AddStudent(new Student("Oleg Pilipenko", new Knowledge(3))); university.AddStudent(s); Internship internship = new Internship("Interlink"); internship.SelectStudents(university); Console.WriteLine("List of internship's students:"); Console.WriteLine(internship.GetStudents()); Console.WriteLine(universityWithoutStudents.GetAverageKnowledge()); }
static void Main(string[] args) { var s = new Student("Alex", new Knowledge(5)); University university = new University("CH.U.I."); university.AddStudent(new Student(("Andrew Kostenko"), new Knowledge(3))); university.AddStudent(new Student(("Julia Veselkina"), new Knowledge(4))); university.AddStudent(new Student(("Maria Perechrest"), new Knowledge(5))); University university2 = new University("CH.D.T.U"); university2.AddStudent(new Student(("Prokopenko Serj"), new Knowledge(5))); university2.AddStudent(new Student(("Julia Vereschagina"), new Knowledge(4))); university2.AddStudent(new Student(("Peter Parker"), new Knowledge(5))); Internship internship = new Internship("Interlink"); internship.AddUniversity(university); internship.AddUniversity(university2); Console.WriteLine("List of internship's students:"); Console.WriteLine(internship.GetStudents()); }
private static void Main(string[] args) { // read students var provider = GetStudentsProvider(); List <Student> students = provider.GetStudents(); var university = new University("CH.U.I."); // add students to university university.AddStudents(students); Console.WriteLine("List of all students:"); Console.WriteLine(string.Join(", ", students.Select(x => x.Name))); // create intership with minimal level of knowlenge for student var internship = new Internship("Interlink", university.GetAverageStudentsLevel()); internship.ApplyToInternship(students); Console.WriteLine("List of internship's students:"); Console.WriteLine(internship.GetStudents()); Console.ReadKey(); }
static void Main(string[] args) { FileStream fs = new FileStream("candidates.xml", FileMode.OpenOrCreate); var s1 = new Student("Ivan", new Knowledge(80)); var s2 = new Student("Dany", new Knowledge(0)); var s3 = new Student("Mark", new Knowledge(100)); Student[] stud = new Student[] { s1, s2, s3 }; XmlSerializer formatter = new XmlSerializer(typeof(Student[])); using (fs) { formatter.Serialize(fs, stud); } var s = new Student("Alex"); University university = new University("CH.U.I."); university.AddStudent(new Student("Andrew Kostenko", new Knowledge(80))); university.AddStudent(new Student("Julia Veselkina", new Knowledge(70))); university.AddStudent(new Student("Maria Perechrest", new Knowledge(60))); s.SetKnowledge(new Knowledge(80)); Internship internship = new Internship("Interlink"); foreach (var student in university.students) { internship.candidates.Add(student); } internship.candidates.Add(s); internship.GetCandidatesFrom(fs = new FileStream("candidates.xml", FileMode.OpenOrCreate)); internship.GetStudents(university, internship.candidates); Console.WriteLine("List of internship's students:"); Console.WriteLine(internship.ShowBestStudents()); Console.ReadLine(); }
static void Main(string[] args) { List <Student> students = GetStudents(); University university = new University("CH.U.I."); foreach (var stud in students) { university.AddStudent(stud); } Internship internship = new Internship("Interlink"); foreach (var stud in university.Students) { internship.SetStudent(stud); } Console.WriteLine("List of internship's students:"); Console.WriteLine(internship.GetStudents()); Console.ReadKey(); }
static void Main(string[] args) { var student1 = new Student("Viktoriia Pavliuk"); student1.SetKnowledge(new Knowledge(88)); var student2 = new Student("Vitaliy Datsyshyn"); student2.SetKnowledge(new Knowledge(89)); var student3 = new Student("Petro Beckham"); student3.SetKnowledge(new Knowledge(47)); var student4 = new Student("Natalie Dormer"); student4.SetKnowledge(new Knowledge(70)); var LPNU = new University("LP NU"); LPNU.AddStudent(student1); LPNU.AddStudent(student2); LPNU.AddStudent(student3); LPNU.AddStudent(student4); IReader reader = new ConsoleReader(); LPNU.AddStudents(reader.ReadStudents()); var internship = new Internship("InterLink"); internship.AddStudentsFromUniversity(LPNU); IWriter writer = new ConsoleWriter(); writer.WriteStudents(internship.GetStudents()); }
static void Main(string[] args) { Student s1 = new Student("Alex Kostenko"); Student s2 = new Student("Maria Veselkina"); Student s3 = new Student("Julia Prechrest"); Student s4 = new Student("Andriy Vorochinsky"); Student s5 = new Student("Vladyslav Machete"); s1.SetKnowledge(new Knowledge(20)); s2.SetKnowledge(new Knowledge(38)); s3.SetKnowledge(new Knowledge(54)); s4.SetKnowledge(new Knowledge(84)); s5.SetKnowledge(new Knowledge(46)); University university1 = new University("CH.U.I."); university1.AddStudent(s1); university1.AddStudent(s2); university1.AddStudent(s3); University university2 = new University("L.N.U"); university2.AddStudent(s4); university2.AddStudent(s5); Internship internship = new Internship("Interlink"); internship.ApplyStudent(s1); internship.ApplyStudent(s2); internship.ApplyStudent(s3); internship.ApplyStudent(s4); internship.ApplyStudent(s5); Console.WriteLine("List of internship's students:"); Console.WriteLine(internship.GetStudents()); }