Exemplo n.º 1
0
        static void Main(string[] args)
        {
            //Instructors
            Instructor John = new Instructor("John", "English");
            Instructor Mike = new Instructor("Mike", "Math");

            //Jane
            Student Jane = new Student("Jane", John);
            John.SetStudentGrade(Jane, 95);
            Jane.PrintStudentInfo();

            //Joe
            Student Joe = new Student("Joe", John);
            John.SetStudentGrade(Joe, 85);
            Joe.PrintStudentInfo();

            //Mellisa
            Student Melissa = new Student("Melissa", Mike);
            Mike.SetStudentGrade(Melissa, 90);
            Mike.PrintStudentInfo();

            //Matt
            Student Matt = new Student("Matt", Mike);
            Mike.SetStudentGrade(Matt, 92);
            Matt.PrintStudentInfo();
        }
Exemplo n.º 2
0
 public Student(string StudentName, Instructor Teacher)
 {
     this.StudentName = StudentName;
     this.Teacher = Teacher;
     Grade = 0;
 }