コード例 #1
0
 private static void TryShowWantedData(string input, string[] data)
 {
     if (data.Length == 2)
     {
         string courseName = data[1];
         StudentsRepository.GetAllStudentsFromCourse(courseName);
     }
     else if (data.Length == 3)
     {
         string courseName = data[1];
         string userName   = data[2];
         StudentsRepository.GetStudentScoresFromCourse(courseName, userName);
     }
     else
     {
         DisplayInvalidCommandMessage(input);
     }
 }
コード例 #2
0
 public CommandInterpreter(Tester judge, StudentsRepository repository, IOManager inputOutputManager)
 {
     this.judge              = judge;
     this.repository         = repository;
     this.inputOutputManager = inputOutputManager;
 }
コード例 #3
0
        private static void TryReadDatabaseFromFile(string input, string[] data)
        {
            string fileName = data[1];

            StudentsRepository.InitializeData(fileName);
        }