complete all parts

This commit is contained in:
2026-05-25 11:20:21 +03:30
parent 83746b88f6
commit 2c98b0a522
11 changed files with 114 additions and 78 deletions
+16 -18
View File
@@ -11,33 +11,31 @@ public class StudentManager {
public void addStudents(ArrayList<Student> newStudents) {
// TODO:
// Merge students
// Hint:
// addAll()
students.addAll(newStudents);
}
public Student searchStudent(int id) {
// TODO:
// Loop through students
// Compare IDs
for (Student s : students)
{
if (id == s.getId())
{
return s;
}
}
return null;
}
public boolean removeStudent(int id) {
// TODO:
// Find student
// Remove student
for (Student s : students)
{
if (id == s.getId())
{
students.remove(s);
return true;
}
}
return false;
}