2024-10-22 08:55:54 +04:00
|
|
|
import 'domain/models/Student.dart';
|
2024-10-01 20:53:17 +04:00
|
|
|
|
|
|
|
class University {
|
|
|
|
List<Student> students = [];
|
|
|
|
|
|
|
|
void addStudent(Student student) {
|
|
|
|
students.add(student);
|
|
|
|
}
|
|
|
|
|
|
|
|
List<Student> getStudentsByCourse(String course) {
|
2024-10-22 08:55:54 +04:00
|
|
|
return students
|
|
|
|
.where((student) => student.courses.contains(course))
|
|
|
|
.toList();
|
2024-10-01 20:53:17 +04:00
|
|
|
}
|
2024-10-22 08:55:54 +04:00
|
|
|
}
|