diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..901eaf0
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/main/java/entities/Course.java b/src/main/java/entities/Course.java
index 522d73e..5676b08 100644
--- a/src/main/java/entities/Course.java
+++ b/src/main/java/entities/Course.java
@@ -1,34 +1,70 @@
package entities;
-import java.util.List;
import java.util.ArrayList;
/**
* entity layer
*/
public class Course {
- /*
+ /**
class for Course entity with private instance variables
- uses StudentUser, InstructorUser, and Task entity classes
+ using StudentUser, InstructorUser, and Task entities
*/
- public String courseName;
- public String courseInstructor;
- public List students; // will be storing the IDs of students
- private int numStudents;
- public List tasks; // will be storing the tasks IDs
- public Boolean publish;
+ private String courseName;
+ private String courseInstructor;
+ private ArrayList students; // stores the IDs of students enrolled in the course
+ private ArrayList tasks; // stores the IDs of the course's tasks
+ private Boolean published;
/**
- * Creates a new Course with a course name and a list of tasks
+ * Creates a new Course with a course name, instructor, and a list of tasks
* @param courseName the name of the course
+ * @param courseInstructor the name of the course instructor
* @param tasks the tasks corresponding to the course
*/
- public Course(String courseName, List tasks) {
+ public Course(String courseName, String courseInstructor, ArrayList tasks) {
this.courseName = courseName;
+ this.courseInstructor = courseInstructor;
this.tasks = tasks;
- this.courseInstructor = "pgries";
- this.students = new ArrayList<>(numStudents);
- this.numStudents = 0;
- this.publish = false; // course creation, default set to not yet published
+ this.students = new ArrayList();
+ this.published = false; // course creation, default set to not yet published
+ }
+
+ /**
+ all getters
+ */
+ public String getCourseName() {
+ return courseName;
+ }
+ public String getCourseInstructor() {
+ return courseInstructor;
+ }
+ public ArrayList getStudents() {
+ return new ArrayList(this.students);
+ }
+ public ArrayList getTasks() {
+ return new ArrayList(this.tasks);
+ }
+ public Boolean getPublished() {
+ return published;
+ }
+
+ /**
+ all setters
+ */
+ public void setCourseName(String courseName) {
+ this.courseName = courseName;
+ }
+ public void setCourseInstructor(String courseInstructor) {
+ this.courseInstructor = courseInstructor;
+ }
+ public void setStudents(ArrayList students) {
+ this.students = new ArrayList(students);
+ }
+ public void setTasks(ArrayList tasks) {
+ this.tasks = new ArrayList(tasks);
+ }
+ public void setPublished(Boolean published) {
+ this.published = published;
}
}