diff --git a/src/Course.java b/src/Course.java new file mode 100644 index 0000000..9321cc0 --- /dev/null +++ b/src/Course.java @@ -0,0 +1,11 @@ + +public enum Course { + EE201, + EE202, + IE201, + IE200, + ISLS201, + EE250 + + +} diff --git a/src/Education.java b/src/Education.java index 20c291a..9131d46 100644 --- a/src/Education.java +++ b/src/Education.java @@ -1,8 +1,11 @@ +import java.util.ArrayList; +import java.util.List; public class Education { private String School; private String Major; private Level level; + private List courses = new ArrayList(6); public Education(String school, String major, Level lvl) { School = school; @@ -10,6 +13,31 @@ public class Education { level = lvl; } + public List getCourses() { + return courses; + } + + public void addCourse(Course course) { + this.courses.add(course); + } + + public boolean addCourses(List courses) { + if (canAddCourse()) { + for (Course course : courses) { + this.courses.add(course); + } + return true; + } + else return false; + } + + public boolean canAddCourse() { + if (courses.size() == 6) { + return false; + } + else return true; + } + public String getSchool() { return School; } @@ -32,5 +60,11 @@ public class Education { public void setLevel(Level level) { this.level = level; } + + public int numberOfCourses() { + return courses.size(); + } + + }