Finish OOP assignment
This commit is contained in:
@@ -2,13 +2,24 @@ 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 course1 = new Course( "Advanced Programming" , "AP1404" , 2);
|
||||
Course course2 = new Course( "Data Structures" , "DS2201" , 1);
|
||||
Course course3 = new Course( "Database Systems" , "DB3301" , 3);
|
||||
|
||||
Student A = new Student( "Ali" , "402222001");
|
||||
|
||||
RegistrationSystem system = new RegistrationSystem();
|
||||
|
||||
system.addCourseToSystem(course1);
|
||||
system.addCourseToSystem(course2);
|
||||
system.addCourseToSystem(course3);
|
||||
|
||||
A.addCourse(course2);
|
||||
A.addCourse(course3);
|
||||
|
||||
A.dropCourse(course2);
|
||||
|
||||
A.showRegisteredCourses();
|
||||
system.showAllCourses();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user