Skip to content
Snippets Groups Projects
Course.java 1.26 KiB
Newer Older
import enumeration.BachelorSemester;
import enumeration.CourseType;
import enumeration.ExamType;
import enumeration.Mark;

TayBone2305's avatar
TayBone2305 committed
public class Course
{
    // most attributes are concrete and can't be changed easily without changing the whole system
    private final int id;   // PK // FK
    private final String name;
    private final BachelorSemester bachelorSemester;
    private final CourseType courseType;
    private final int sws;
    private final double ects;
TayBone2305's avatar
TayBone2305 committed
    private ExamType examType;

    public Course(int id, String name, BachelorSemester bachelorSemester, CourseType courseType, int sws, double ects, ExamType examType)
TayBone2305's avatar
TayBone2305 committed
    {
        this.id = id;
        this.name = name;
        this.bachelorSemester = bachelorSemester;
        this.courseType = courseType;
        this.sws = sws;
        this.ects = ects;
        this.examType = examType;
    }
Kevin Thaller's avatar
Kevin Thaller committed
    public int getId(){
        return id;
    }
Kevin Thaller's avatar
Kevin Thaller committed
    @Override
    public String toString() {
        return "\nCourse: " +
                "id=" + id +
                ", name='" + name + '\'' +
                ", bachelorSemester=" + bachelorSemester +
                ", courseType=" + courseType +
                ", sws=" + sws +
                ", ects=" + ects +
                ", examType=" + examType;
TayBone2305's avatar
TayBone2305 committed
}