Alright. I'm having a problem. I have to load student data from text files, and put them into a class called Students.
So far-
const string STUDENT_FILE = @"C:Users\Etc\Etc\Students.txt";
Students students = File.Routines.LoadStudents(STUDENT_FILE)
Then my class FileRoutines uses it's method
static public string [] LoadStudents(string STUDENT_FILE)
To read the file line by line and create a string array for each line. (this is what I have so far, I wasn't given very much to work with.)
string[] students = File.ReadAllLines(STUDENTS_FILE);
The instructions say that I have to "read all lines in the student input file, create a student object from each line. return a Students object that contains an array of the Students objects.
And by the end of it all, that array is supposed to end up in the Students class. I'm supposed to also do a .Split('\t') on the students array and split it up into 3 more arrays.
The file that I'm working with has data set up as so. 122338 Weltzer Teresa 123123 Wang Choo 123131 Adams James 123132 Binkley Joshua 123139 Howard Tyler 123160 King Alma
After all the code, it's supposed to have 3 string arrays.
studentID[]
lastName[]
firstName[]
I know this is kinda of ridiculous, and I'm asking a lot. But I have looked everywhere, and I can't figure out how to do it. I've seen how to do it other ways, but I was asked to do it this specific way. If I can clarify anything more for y'all, or if I need to add something to let me know. This is my first post, so go easy. Thanks!