コード例 #1
0
ファイル: Program.cs プロジェクト: mcmejorado/IT-1050
        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();
                   
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: pieisgood4u/IT-1050-master
        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();
        }
コード例 #3
0
ファイル: Student.cs プロジェクト: mcmejorado/IT-1050
 public Student(string name, Instructor teacher, int grade)
 {
     this.name = name;
     this.teacher = teacher;
     this.grade = grade;
 }
コード例 #4
0
ファイル: Student.cs プロジェクト: Madhunayak/IT1050
 public Student(string Studentname , Instructor Teacher1)
 {
     this.Name = Studentname;
     this.Teacher = Teacher1;
 }