当前位置: 首页>>代码示例>>C#>>正文


C# Student.Print方法代码示例

本文整理汇总了C#中Student.Print方法的典型用法代码示例。如果您正苦于以下问题:C# Student.Print方法的具体用法?C# Student.Print怎么用?C# Student.Print使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Student的用法示例。


在下文中一共展示了Student.Print方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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();
        }
开发者ID:kcbwilson,项目名称:IT-1050,代码行数:27,代码来源:Program.cs

示例2: Main

        static void Main(string[] args)
        {

            //     INSTUCTOR CREATION     //
            Instructor john = new Instructor("John", "English");
            Instructor mike = new Instructor("Mike", "Math");
            
            //     STUDENT CREATION     //
            Student jane = new Student("Jane", john);
            Student joe = new Student("Joe", john);
            Student melissa = new Student("Melissa", mike);
            Student matt = new Student("Matt", mike);

            //     GRADE ASSIGNMENT     //
            john.SetGrade(jane, 95);
            john.SetGrade(joe, 85);
            mike.SetGrade(melissa, 90);
            mike.SetGrade(matt, 92);

            jane.Print();
            joe.Print();
            melissa.Print();
            matt.Print();
            System.Console.Read();

        }
开发者ID:hannah-purgar,项目名称:IT-1025,代码行数:26,代码来源:Program.cs

示例3: Main

        static void Main(string[] args)
        {
            Instructor John = new Instructor("John", "English");

            Instructor Mike = new Instructor("Mike", "Math");

            John.PrintTeacherInformation();

            System.Console.WriteLine(" ");

            Mike.PrintTeacherInformation();

            System.Console.WriteLine(" ");

            Student Jane = new Student("Jane", 0, John);

            Student Joe = new Student("Joe", 0, John);

            Student Melissa = new Student("Melissa", 0, Mike);

            Student Matt = new Student("Matt", 0, Mike);

            John.SetStudentGrade(Jane, 95);

            John.SetStudentGrade(Joe, 85);

            Mike.SetStudentGrade(Melissa, 90);

            Mike.SetStudentGrade(Matt, 92);

            System.Console.WriteLine(" ");

            Jane.Print();

            Joe.Print();

            Melissa.Print();

            Matt.Print();

            System.Console.WriteLine(" ");

            System.Console.ReadKey();
        }
开发者ID:bbosowski6690,项目名称:IT-1050,代码行数:44,代码来源:Program.cs

示例4: 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();
        }
开发者ID:Neishafannin,项目名称:MyStuff,代码行数:20,代码来源:Program.cs

示例5: 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.
        }
开发者ID:bbosowski6690,项目名称:IT-1050,代码行数:38,代码来源:Program.cs

示例6: Main

 static void Main(string[] args)
 {
     Persoon s = new Student();
     s.Print();
     s.PrintVirtual();
 }
开发者ID:riezebosch,项目名称:cnetin1,代码行数:6,代码来源:Program.cs


注:本文中的Student.Print方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。