complete Main.java
This commit is contained in:
@@ -2,13 +2,25 @@ package CourseRegistrationStarter;
|
|||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
// TODO:
|
|
||||||
// 1. Create at least 3 courses
|
Course AdvancedProgramming = new Course("AdvancedProgramming", "AP1404", 2);
|
||||||
// 2. Create 1 student
|
Course DataStructures = new Course("DataStructures", "DS2201", 1);
|
||||||
// 3. Create a registration system
|
Course DatabaseSystems = new Course("DatabaseSystems", "DB3301", 3);
|
||||||
// 4. Add courses to the system
|
|
||||||
// 5. Register the student in some courses
|
Student fateme = new Student("fateme", "404222000");
|
||||||
// 6. Drop one course
|
|
||||||
// 7. Print the final registered course list
|
RegistrationSystem A = new RegistrationSystem();
|
||||||
|
|
||||||
|
A.addCourseToSystem(AdvancedProgramming);
|
||||||
|
A.addCourseToSystem(DataStructures);
|
||||||
|
A.addCourseToSystem(DatabaseSystems);
|
||||||
|
|
||||||
|
fateme.addCourse(AdvancedProgramming);
|
||||||
|
fateme.addCourse(DataStructures);
|
||||||
|
fateme.addCourse(DatabaseSystems);
|
||||||
|
|
||||||
|
fateme.dropCourse(DataStructures);
|
||||||
|
|
||||||
|
fateme.showRegisteredCourses();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user