Complete all classes .
This commit is contained in:
@@ -4,11 +4,36 @@ public class Main {
|
||||
public static void main(String[] args) {
|
||||
// TODO:
|
||||
// 1. Create at least 3 courses
|
||||
|
||||
Course course1 = new Course("Advanced Programming" , "AP1404", 2) ;
|
||||
Course course2 = new Course("Data Structures", "DS2201", 1) ;
|
||||
Course course3 = new Course("Database Systems", "DB3301", 3) ;
|
||||
|
||||
// 2. Create 1 student
|
||||
|
||||
Student student1 = new Student ("Ali", "402222001") ;
|
||||
|
||||
// 3. Create a registration system
|
||||
|
||||
RegistrationSystem registrationSystem = new RegistrationSystem() ;
|
||||
|
||||
// 4. Add courses to the system
|
||||
|
||||
registrationSystem.addCourseToSystem(course1) ;
|
||||
registrationSystem.addCourseToSystem(course2) ;
|
||||
registrationSystem.addCourseToSystem(course3) ;
|
||||
|
||||
// 5. Register the student in some courses
|
||||
|
||||
student1.addCourse(course1) ;
|
||||
student1.addCourse(course2) ;
|
||||
student1.addCourse(course3) ;
|
||||
// 6. Drop one course
|
||||
|
||||
student1.dropCourse(course2) ;
|
||||
// 7. Print the final registered course list
|
||||
|
||||
student1.showRegisteredCourses() ;
|
||||
registrationSystem.showAllCourses();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user