Esempio n. 1
0
 public static void Main(string[] strings)
 {
     // Create a student.
     Student student = new Student();
     student.Init("Stephen Davis", 1234);
     // Now enroll the student in a course.
     Console.WriteLine
            ("Enrolling Stephen Davis in Biology 101");
     student.Enroll("Biology 101");
     // Display student course.
     Console.WriteLine("Resulting student record:");
     student.DisplayCourse();
     // Wait for user to acknowledge the results.
     Console.WriteLine("Press Enter to terminate...");
     Console.Read();
 }
Esempio n. 2
0
        public static void Main(string[] strings)
        {
            // Create a student.
            Student student = new Student();

            student.Init("Stephen Davis", 1234);

            // Now enroll the student in a course.
            Console.WriteLine
                ("Enrolling Stephen Davis in Biology 101");
            student.Enroll("Biology 101");

            // Display student course.
            Console.WriteLine("Resulting student record:");
            student.DisplayCourse();

            // Wait for user to acknowledge the results.
            Console.WriteLine("Press Enter to terminate...");
            Console.Read();
        }