hi I'm working on my hw and I have problem
I know how to read file from data and split each line using array

now I want to use arrayList .. I want to read the data from the file and create arrayList and then split each line and create object of type student
the file contain the following

Course Number
Course Name
Semester
ID,program,GPA

I have two class
class Student and class course .. the class student have information about student (id,programand GPA)
the class course contain ( course num,courseName,semester,List<Student> student)
also I add createStudent method .. I'm trying to use polymorphism and ArrayList

this is what I got so far in the main form

public List<Student> createStudent(String fileName) {



List<String> data = FileUtils.readIntoList(fileName);
List<Student> res = new ArrayList();
for(int i =0; i < course.size(); i++){
Course temp = course.get(i);
String num = temp.getCourseNumber();
String name = temp.getCourseName();
String semester = temp.getSemester();
List <Student> s = temp.getStudent();

Course c = new Course(num,name,semester,s);
res.get(i); 

}
return res;

}

I know how to read file from data and split each line using array

Then I fail to see what the problem is.

Pretty much the same question as your other thread.
This post should get you started.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.