コード例 #1
0
ファイル: Program.cs プロジェクト: amarkwong/homework1
        public static void addStudentMenu()
        {
            Console.Clear();
            Console.WriteLine("ADD A STUDENT");
            Console.WriteLine("Please input the student name");
            String studentName = Console.ReadLine();

            Console.WriteLine("Please input the credit limit of the student, enter for the default value");
            int studentCreditLimit = InputValidation.checkCreditLimit(Console.ReadLine());

            if (studentCreditLimit == -1)
            {
                school.addStudent(studentName);
            }
            else
            {
                school.addStudent(studentName, studentCreditLimit);
            }
            Console.WriteLine("Press any key to continue");
            Console.ReadLine();
        }