-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCourse.java
More file actions
43 lines (33 loc) · 1002 Bytes
/
Course.java
File metadata and controls
43 lines (33 loc) · 1002 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package STUDENTMANAGEMNT;
import java.util.ArrayList;
import java.util.List;
public class Course {
private String courseName;
private String courseCode;
private List<Student> registeredStudents;
public Course(String courseName, String courseCode) {
this.courseName = courseName;
this.courseCode = courseCode;
this.registeredStudents = new ArrayList<>();
}
public String getCourseName() {
return courseName;
}
public String getCourseCode() {
return courseCode;
}
public void registerStudent(Student student) {
registeredStudents.add(student);
}
public void unregisterStudent(Student student) {
registeredStudents.remove(student);
}
public List<Student> getRegisteredStudents() {
return registeredStudents;
}
public void assignGrades(String[] grades) {
}
public boolean isRegistered() {
return false;
}
}