feat: Set up project skeleton with stub implementations for student tasks
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
package dev.service;
|
||||
|
||||
import dev.model.Student;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
public class StudentManager {
|
||||
|
||||
private final ArrayList<Student> students =
|
||||
new ArrayList<>();
|
||||
|
||||
public void addStudents(
|
||||
ArrayList<Student> newStudents) {
|
||||
|
||||
// TODO:
|
||||
|
||||
// Merge students
|
||||
|
||||
// Hint:
|
||||
// addAll()
|
||||
|
||||
}
|
||||
|
||||
public Student searchStudent(
|
||||
int id) {
|
||||
|
||||
// TODO:
|
||||
|
||||
// Loop through students
|
||||
|
||||
// Compare IDs
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean removeStudent(
|
||||
int id) {
|
||||
|
||||
// TODO:
|
||||
|
||||
// Find student
|
||||
|
||||
// Remove student
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void printStudents() {
|
||||
|
||||
for (Student student : students) {
|
||||
|
||||
System.out.println(student);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user