Skip to content
This repository has been archived by the owner on Mar 30, 2024. It is now read-only.

Commit

Permalink
Separated CourseEnrollment and WaitlistedItem
Browse files Browse the repository at this point in the history
- separated CourseEnrollment and WaitlistedItem classes
- added Course foreign key to both CourseEnrollment and WaitlistedItem classes
  • Loading branch information
danielphung01 authored Nov 11, 2021
1 parent d70bf98 commit f9d6927
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions Project.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,16 @@ class CourseSection {
}

class CourseEnrollment {
constructor(CourseSection, Student, grade) {
constructor(Course, CourseSection, Student, grade) {
this.Course = Course;
this.CourseSection = CourseSection;
this.Student = Student;
this.grade = grade;
this.waitlistPosition = waitlistPosition;
}

get Course() { return this.Course; }
set Course(Course) { this.Course = Course; }

get CourseSection() { return this.CourseSection; }
set CourseSection(CourseSection) { this.CourseSection = CourseSection; }

Expand All @@ -128,7 +131,25 @@ class CourseEnrollment {

get grade() { return this.grade; }
set grade(grade) { this.grade = grade; }
}

class WaitlistedItem {
constructor(Course, CourseSection, Student, waitlistPosition) {
this.Course = Course;
this.CourseSection = CourseSection;
this.Student = Student;
this.waitlistPosition = waitlistPosition;
}

get Course() { return this.Course; }
set Course(Course) { this.Course = Course; }

get CourseSection() { return this.CourseSection; }
set CourseSection(CourseSection) { this.CourseSection = CourseSection; }

get Student() { return this.Student; }
set Student(Student) { this.Student = Student; }

get waitlistPosition() { return this.waitlistPosition; }
set waitlistPosition(waitlistPosition) { this.grade = waitlistPosition; }
}
}

0 comments on commit f9d6927

Please sign in to comment.