static void Main(string[] args) { Instructor John = new Instructor("John", "English"); Instructor Mike = new Instructor("Mike", "Math"); Student Jane = new Student("Jane", John); Student Joe = new Student("Joe", John); Student Melissa = new Student("Melissa", Mike); Student Matt = new Student("Matt", Mike); John.SetStudentGrade(Jane, 95); John.SetStudentGrade(Joe, 85); Mike.SetStudentGrade(Melissa, 90); Mike.SetStudentGrade(Matt, 92); Jane.PrintStudentInfo(); System.Console.WriteLine(); Joe.PrintStudentInfo(); System.Console.WriteLine(); Melissa.PrintStudentInfo(); System.Console.WriteLine(); Matt.PrintStudentInfo(); System.Threading.Thread.Sleep(8000); }
static void Main(string[] args) { Instructor John = new Instructor(); John.Name = "John"; John.CourseName = "English"; Instructor Mike = new Instructor(); Mike.Name = "Mike"; Mike.CourseName = "Math"; Student Jane = new Student(); Jane.Name = "Jane"; Jane.Teacher = John; Student Joe = new Student(); Joe.Name = "Joe"; Joe.Teacher = John; Student Melissa = new Student(); Melissa.Name = "Melissa"; Melissa.Teacher = Mike; Student Matt = new Student(); Matt.Name = "Matt"; Matt.Teacher = Mike; John.SetStudentGrade(Jane, 95); John.SetStudentGrade(Joe, 85); Mike.SetStudentGrade(Melissa, 90); Mike.SetStudentGrade(Matt, 92); Jane.PrintStudentInfo(); Joe.PrintStudentInfo(); Melissa.PrintStudentInfo(); Matt.PrintStudentInfo(); }
static void Main(string[] args) { Instructor John = new Instructor("John", "Stamos", "English"); Instructor Mike = new Instructor("Mike", "Rowe", "Math"); Student Jane = new Student("Jane", "Doe", John); Student Joe = new Student("Joe", "Cool", John); Student Melissa = new Student("Melissa", "Cannowitz", Mike); Student Matt = new Student("Matt", "Carpenter", Mike); John.SetStudentGrade(Jane, 95); John.SetStudentGrade(Joe, 85); Mike.SetStudentGrade(Melissa, 90); Mike.SetStudentGrade(Matt, 92); Console.WriteLine(Jane.PrintStudentInfo()); Console.WriteLine(Joe.PrintStudentInfo()); Console.WriteLine(Melissa.PrintStudentInfo()); Console.WriteLine(Matt.PrintStudentInfo()); Console.ReadKey(); }