diff --git a/src/CourseRegistrationStarter/Main.java b/src/CourseRegistrationStarter/Main.java index 2e0c015..3b8ceff 100644 --- a/src/CourseRegistrationStarter/Main.java +++ b/src/CourseRegistrationStarter/Main.java @@ -1,15 +1,40 @@ package CourseRegistrationStarter; -public class Main { +public class Main +{ public static void main(String[] args) { - // TODO: // 1. Create at least 3 courses + Course c1 = new Course("Advanced Programming", "CS101", 2); + Course c2 = new Course("Mathematics", "MATH201", 1); + Course c3 = new Course("Foundations of Mathematical Sciences","MATH301", 3); + // 2. Create 1 student + Student s1 = new Student("Romina", "40123456"); + // 3. Create a registration system + RegistrationSystem regSys = new RegistrationSystem(); + // 4. Add courses to the system + regSys.addCourseToSystem(c1); + regSys.addCourseToSystem(c2); + regSys.addCourseToSystem(c3); + + regSys.showAllCourses(); + // 5. Register the student in some courses + s1.addCourse(c1); + s1.addCourse(c2); + s1.addCourse(c3); + + s1.showRegisteredCourses(); + // 6. Drop one course + s1.dropCourse(c2); + // 7. Print the final registered course list + s1.showRegisteredCourses(); + + regSys.showAllCourses(); } -} +} \ No newline at end of file