本文整理汇总了C#中Instructor.SetStudentGrade方法的典型用法代码示例。如果您正苦于以下问题:C# Instructor.SetStudentGrade方法的具体用法?C# Instructor.SetStudentGrade怎么用?C# Instructor.SetStudentGrade使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Instructor
的用法示例。
在下文中一共展示了Instructor.SetStudentGrade方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
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();
Joe.PrintStudentInfo();
Melissa.PrintStudentInfo();
Matt.PrintStudentInfo();
System.Console.WriteLine();
System.Console.ReadKey();
}
示例2: Main
static void Main(string[] args)
{
Instructor EnglishInstructor = new Instructor("John", "English");
Instructor MathInstructor = new Instructor("Mike", "Math");
Student Student1 = new Student("Jane", EnglishInstructor);
Student Student2 = new Student("Joe", EnglishInstructor);
Student Student3 = new Student("Melissa", MathInstructor);
Student Student4 = new Student("Matt", MathInstructor);
EnglishInstructor.SetStudentGrade(Student1, 95);
EnglishInstructor.SetStudentGrade(Student2, 85);
MathInstructor.SetStudentGrade(Student3, 90);
MathInstructor.SetStudentGrade(Student4, 92);
System.Console.WriteLine(" Student Information ");
System.Console.WriteLine(" ");
Student1.Print();
Student2.Print();
Student3.Print();
Student4.Print();
System.Console.ReadKey();
}
示例3: Main
static void Main(string[] args)
{
var john = new Instructor("John", "English");
var mike = new Instructor("Mike", "Math");
var jane = new Student("Jane", john);
var joe = new Student("Joe", john);
var melissa = new Student("Melissa", mike);
var matt = new Student("Matt", mike);
john.SetStudentGrade(jane, 95);
john.SetStudentGrade(joe, 85);
mike.SetStudentGrade(melissa, 90);
mike.SetStudentGrade(matt, 92);
Show.Divider();
Show.Header();
jane.PrintStudentInfo();
joe.PrintStudentInfo();
melissa.PrintStudentInfo();
matt.PrintStudentInfo();
Show.Divider();
Show.ProgEnd();
}
示例4: Main
static void Main(string[] args)
{
Instructor John = new Instructor("John", "Smith", "English");
John.PrintInfo();
Instructor Mike = new Instructor("Mike", "Jones", "Math");
Mike.PrintInfo();
Student Jane = new Student("Jane", "Adams", John, 0);
Student Joe = new Student("Joe", "Jenkins", John, 0);
Student Melissa = new Student("Melissa", "King", Mike, 0);
Student Matt = new Student("Matt", "Sanchez", Mike, 0);
John.SetStudentGrade(Jane, 95);
John.SetStudentGrade(Joe, 85);
Mike.SetStudentGrade(Melissa, 90);
Mike.SetStudentGrade(Matt, 92);
Jane.PrintNameTeacherCourse();
Joe.PrintNameTeacherCourse();
Melissa.PrintNameTeacherCourse();
Matt.PrintNameTeacherCourse();
System.Console.ReadKey();
}
示例5: Main
static void Main(string[] args)
{
Instructor person1 = new Instructor("John", "English");
Instructor person2 = new Instructor("Mike", "Math");
Student student1 = new Student("Jane", person1);
Student student2 = new Student("Joe", person1);
Student student3 = new Student("Melissa", person2);
Student student4 = new Student("Matt", person2);
person1.SetStudentGrade(student1, 95);
person1.SetStudentGrade(student2, 85);
person2.SetStudentGrade(student3, 90);
person2.SetStudentGrade(student4, 92);
student1.Print();
student2.Print();
student3.Print();
student4.Print();
}
示例6: Main
static void Main(string[] args)
{
Instructor John = new Instructor("John", "Smith", "English");
Instructor Mike = new Instructor("Mike", "Thornton", "Math");
John.SetStudentGrade("Jane", 95);
John.SetStudentGrade("Joe", 85);
Mike.SetStudentGrade("Melissa", 90);
Mike.SetStudentGrade("Matt", 92);
Student Jane = new Student("Jane", 0, John);
Jane.Print();
Student Joe = new Student("Joe", 0, John);
Joe.Print();
Student Melissa = new Student("Melissa", 0, Mike);
Melissa.Print();
Student Matt = new Student("Matt", 0, Mike);
Matt.Print();
System.Console.ReadKey();
//Write your “main” method in Program.cs according to the following pseudocode:
//Create an Instructor named “John” who teaches “English”.
//Create an Instructor named “Mike” who teaches “Math”.
//Create a Student named “Jane” whose teacher is John.
//Create a Student named “Joe” whose teacher is John.
//Create a Student named “Melissa” whose teacher is Mike.
//Create a Student named “Matt” whose teacher is Mike.
//Have John give Jane a grade of 95.
//Have John give Joe a grade of 85.
//Have Mike give Melissa a grade of 90.
//Have Mike give Matt a grade of 92.
//Have every student Print their information.
}
示例7: Main
static void Main(string[] args)
{
// Program purpose:
// Creates new Instructor objects
// Creates new Student objects
// Instructors can set their students' grades
// Student info prints out to the screen after entering grades
Instructor instructor1 = new Instructor("John", "English");
Instructor instructor2 = new Instructor("Mike", "Math");
Student student1 = new Student("Jane", instructor1);
Student student2 = new Student("Joe", instructor1);
Student student3 = new Student("Melissa", instructor2);
Student student4 = new Student("Matt", instructor2);
instructor1.SetStudentGrade(student1, 95);
instructor1.SetStudentGrade(student2, 85);
instructor2.SetStudentGrade(student3, 90);
instructor2.SetStudentGrade(student4, 92);
System.Console.WriteLine("Press any key to continue...");
System.Console.ReadKey();
}