The Result class is made up of "courseCode" and "result". So you can see that the text file has the first four values as primatives and the last three values as Result Objects.

I've used a Scanner to read from similar text files to instantiate other objects, so that part is not my problem.

What I need to do is firstly create and array just consisting of the results from the text file(deliniated by a "-") and then pass that array into the Student constructor.

How do I only read the results values of the text file, that is, skip the 12345678:Aaron:Simons:Y and just read the COSC1070-55:COSC1071-56:COSC07298-89. Also, if each of the text file values id deliniated by a (":"), and within the result value, the two parts are deliniated by a ("-"), how do I just pick out the String "COSC1070" and the Integer "55" and pass those values into the result array?

Hope someone can help, thanks

05-04-2009, 07:37 AM

RamyaSivakanth

This code will give u the courseCode and courseMark as whyat u asked.Please create the Resultclass and store the value.