Finished "TODO" and Bonus sections
This commit is contained in:
@@ -2,13 +2,26 @@ package CourseRegistrationStarter;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
// TODO:
|
||||
// 1. Create at least 3 courses
|
||||
// 2. Create 1 student
|
||||
// 3. Create a registration system
|
||||
// 4. Add courses to the system
|
||||
// 5. Register the student in some courses
|
||||
// 6. Drop one course
|
||||
// 7. Print the final registered course list
|
||||
Course AP = new Course("Advanced Programming", "4041122334", 40);
|
||||
Course FM = new Course("Foundation of Math", "4041212334", 30);
|
||||
Course GM = new Course("General Math","4041234123",60);
|
||||
|
||||
Student farnam = new Student("Farnam", "404111234");
|
||||
farnam.setLimitOfCourses(3);
|
||||
RegistrationSystem regSys = new RegistrationSystem();
|
||||
|
||||
regSys.addCourseToSystem(AP);
|
||||
regSys.addCourseToSystem(FM);
|
||||
regSys.addCourseToSystem(GM);
|
||||
|
||||
farnam.addCourse(AP);
|
||||
farnam.addCourse(FM);
|
||||
farnam.addCourse(GM);
|
||||
|
||||
farnam.dropCourse(FM);
|
||||
|
||||
farnam.showRegisteredCourses();
|
||||
|
||||
regSys.showAllCourses();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user