static void Main(string[] args) { MonsterStudent defaultMonster = new MonsterStudent(); defaultMonster.Jump(); MonsterCohort monsterCohort = new MonsterCohort(); monsterCohort.AddStudent(defaultMonster); StreamReader file = new StreamReader("monster_students.txt"); Console.WriteLine(Directory.GetCurrentDirectory()); string line; while ((line = file.ReadLine()) != null) { string[] words = line.Split(','); monsterCohort.listOfStudents.Add(new MonsterStudent(Convert.ToInt32(words[0]), words[1], Convert.ToInt32(words[2]), words[3], Convert.ToDouble(words[4]), words[5])); } file.Close(); monsterCohort.ListStudents(); }
public void AddStudent(MonsterStudent monsterStudent) { listOfStudents.Add(monsterStudent); }