static void Main(string[] args) { Instructor John = new Instructor("John", "English"); Instructor Mike = new Instructor("Mike", "Math"); Student Jane = new Student("Jane", John, 0); Student Joe = new Student("Joe", John, 0); Student Melissa = new Student("Melissa", Mike, 0); Student Matt = new Student("Matt", Mike, 0); John.SetStudentGrade(Jane, 95); John.SetStudentGrade(Joe,85); Mike.SetStudentGrade(Melissa, 90); Mike.SetStudentGrade(Matt, 92); Utilities.printHeader(); Jane.Print(); Joe.Print(); Melissa.Print(); Matt.Print(); Utilities.printFootNote(); }
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(); }
public Student(string name, Instructor teacher, int grade) { this.name = name; this.teacher = teacher; this.grade = grade; }
public Student(string Studentname , Instructor Teacher1) { this.Name = Studentname; this.Teacher = Teacher1; }