Exemplo n.º 1
0
        public BEUStudent(string name, string surname, int course, int id, ExamScore examScore)
        {
            this.name    = name;
            this.surname = surname;
            this.course  = course;
            this.id      = id;

            this.examScore = examScore;
        }
 public static void ReadStudentDataFromFile(List <IStudent> listStudent)
 {
     using (StreamReader reader = new StreamReader(STUDENT_DATA_PATH))
     {
         string line;
         while ((line = reader.ReadLine()) != null)
         {
             string[]  data    = line.Split(' ');
             string    name    = data[0];
             string    surname = data[1];
             int       course  = int.Parse(data[2]);
             int       id      = int.Parse(data[3]);
             int       sdf1    = int.Parse(data[4]);
             int       sdf2    = int.Parse(data[5]);
             int       sdf3    = int.Parse(data[6]);
             int       final   = int.Parse(data[7]);
             ExamScore scores  = new ExamScore(sdf1, sdf2, sdf3, final);
             listStudent.Add(new BEUStudent(name, surname, course, id, scores));
         }
     }
 }