Filling parallel arrays with input from text file.
801489Sep 14 2008 — edited Sep 14 2008Hello,
I posted earlier about a grade class in "digits to numbers" and I am now working on an application for it. I need to create a set of parallel arrays to hold 60 entries; an array of student ids, an array of grade instances. For this I need to use the data from a text file to load the arrays. In the text file the fields are (id, name, each score) and are in the CSV format. I know I will have to split() this students information to move along furthur. The part I do not get is How do I use the data from the text file to fill the array?
I mean...use file reader? or scanner? and if I pick one of them, how do i fill just student ids from the whole text file? and how about the grade instances? I am confused. If anyone will point me in the right direction I would appreciate it.
Thanks-