feat: Set up project skeleton with stub implementations for student tasks
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
package dev.thread;
|
||||
|
||||
|
||||
|
||||
import dev.model.Student;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class StudentLoader extends Thread {
|
||||
|
||||
// Assigned file lines
|
||||
|
||||
private final List<String> lines;
|
||||
|
||||
// Local student storage
|
||||
|
||||
private final ArrayList<Student> students =
|
||||
new ArrayList<>();
|
||||
|
||||
public StudentLoader(
|
||||
List<String> lines) {
|
||||
|
||||
this.lines = lines;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
// TODO:
|
||||
|
||||
/*
|
||||
Example line:
|
||||
|
||||
1001,Aryan,Computer Science,3.7
|
||||
*/
|
||||
|
||||
for (String line : lines) {
|
||||
|
||||
// TODO:
|
||||
// split line
|
||||
|
||||
// TODO:
|
||||
// read values
|
||||
|
||||
// TODO:
|
||||
// create Student
|
||||
|
||||
// TODO:
|
||||
// add to students list
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public ArrayList<Student>
|
||||
getStudents() {
|
||||
|
||||
return students;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user