forked from ashishps1/awesome-low-level-design
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Course.java
41 lines (33 loc) · 969 Bytes
/
Course.java
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
package courseregistrationsystem;
public class Course {
private final String code;
private final String name;
private final String instructor;
private final int maxCapacity;
private int enrolledStudents;
public Course(String code, String name, String instructor, int maxCapacity, int enrolledStudents) {
this.code = code;
this.name = name;
this.instructor = instructor;
this.maxCapacity = maxCapacity;
this.enrolledStudents = enrolledStudents;
}
public void setEnrolledStudents(int enrolledStudents) {
this.enrolledStudents = enrolledStudents;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
public String getInstructor() {
return instructor;
}
public int getMaxCapacity() {
return maxCapacity;
}
public int getEnrolledStudents() {
return enrolledStudents;
}
}