public static void ManualInput(string id, string nameSurname, string departmanName, string undergraduateSchoolName, string undergraduateDepartmanName, string graduateSchoolName, string graduateDepartmanName, params Temp[] lectures) { PhdStudent phdStudent = new PhdStudent(undergraduateSchoolName, undergraduateDepartmanName, graduateSchoolName, graduateDepartmanName); phdStudent.Id = id; phdStudent.NameSurname = nameSurname; phdStudent.DepartmanName = departmanName; foreach (Temp lecture in lectures) { phdStudent.LectureAdd(lecture.code, lecture.name, lecture.mark, lecture.akts); } students.Add(phdStudent); }
static public void StudentAdd() { while (true) { int chooseP; Console.WriteLine("1-Add Undergraduate Student"); Console.WriteLine("2-Add Graduate Student"); Console.WriteLine("3-Add Phd Student"); Console.WriteLine("Choose :"); chooseP = Convert.ToInt32(Console.ReadLine()); Console.Clear(); if (chooseP == 1) { UndergraduateStudent undergraduateStudent = new UndergraduateStudent(); AddDefaultInfo(undergraduateStudent); } else if (chooseP == 2) { Console.WriteLine("Student's Undergraduate School Name:"); string undergraduateSchoolName = Console.ReadLine(); Console.WriteLine("Student's Undergraduate Departman Name:"); string undergraduateDepartmanName = Console.ReadLine(); GraduateStudent graduateStudent = new GraduateStudent(undergraduateSchoolName, undergraduateDepartmanName); AddDefaultInfo(graduateStudent); } else if (chooseP == 3) { Console.WriteLine("Student's Undergraduate School Name:"); string undergraduateSchoolName = Console.ReadLine(); Console.WriteLine("Student's Undergraduate Departman Name:"); string undergraduateDepartmanName = Console.ReadLine(); Console.WriteLine("Student's Graduate School Name:"); string graduateSchoolName = Console.ReadLine(); Console.WriteLine("Student's Graduate Departman Name:"); string graduateDepartmanName = Console.ReadLine(); PhdStudent graduateStudent = new PhdStudent(undergraduateSchoolName, undergraduateDepartmanName, graduateDepartmanName, graduateSchoolName); AddDefaultInfo(graduateStudent); } else { Console.WriteLine("Wrong Choice!"); Console.ReadKey(); Console.Clear(); continue; } Console.Clear(); } }