develop #1

Open
Parmis_jamami wants to merge 5 commits from develop into main
Showing only changes of commit 6fc03bf1b0 - Show all commits
+12 -14
View File
@@ -25,28 +25,26 @@ public class StudentLoader extends Thread {
@Override @Override
public void run() { public void run() {
// TODO: for(String line : lines){
/* if( line == null || line.isBlank()) continue;
Example line:
1001,Aryan,Computer Science,3.7 try {
*/
for (String line : lines) { String[] parts = line.split(",");
// TODO:
// split line
// TODO: int id = Integer.parseInt(parts[0].trim());
// read values String name = parts[1].trim();
String major = parts[2].trim();
double gpa = Double.parseDouble(parts[3].trim());
// TODO:
// create Student
// TODO: students.add(new Student(id, name, major, gpa));
// add to students list
} catch (Exception e) {
System.err.println("Error parsing line: " + line);
}
} }
} }