-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCourse.java
More file actions
25 lines (20 loc) · 757 Bytes
/
Course.java
File metadata and controls
25 lines (20 loc) · 757 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
package s25.cs151.application.model;
import java.io.Serializable;
public class Course implements Serializable {
private String courseCode;
private String courseName;
private String sectionNumber;
public Course(String courseCode, String courseName, String sectionNumber) {
this.courseCode = courseCode;
this.courseName = courseName;
this.sectionNumber = sectionNumber;
}
// Getters
public String getCourseCode() { return courseCode; }
public String getCourseName() { return courseName; }
public String getSectionNumber() { return sectionNumber; }
@Override
public String toString() {
return String.format("%s - %s (Section %s)", courseCode, courseName, sectionNumber);
}
}