Beispiel #1
0
        static void Main(string[] args)
        {
            TestPaper testPaper = new TestPaperA();

            testPaper.Question1();
            testPaper.Question2();
            testPaper.Question3();
            testPaper = new TestPaperB();
            testPaper.Question1();
            testPaper.Question2();
            testPaper.Question3();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("学生甲抄的试卷:");
            TestPaper studentA = new TestPaperA();

            studentA.TestQuestion1();
            studentA.TestQuestion2();
            studentA.TestQuestion3();

            Console.WriteLine("学生乙抄的试卷:");
            TestPaper studentB = new TestPaperB();

            studentB.TestQuestion1();
            studentB.TestQuestion2();
            studentB.TestQuestion3();

            Console.Read();
        }