changes in class Main
This commit is contained in:
@@ -1,14 +1,26 @@
|
|||||||
package CourseRegistrationStarter;
|
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 c1 = new Course("Advanced Programming","4041",40);
|
||||||
// 2. Create 1 student
|
Course c2 = new Course("Math","4042",50);
|
||||||
// 3. Create a registration system
|
Course c3 = new Course("English","4043",20);
|
||||||
// 4. Add courses to the system
|
|
||||||
// 5. Register the student in some courses
|
RegistrationSystem registrationSystem = new RegistrationSystem();
|
||||||
// 6. Drop one course
|
|
||||||
// 7. Print the final registered course list
|
registrationSystem.addCourseToSystem(c1);
|
||||||
|
registrationSystem.addCourseToSystem(c2);
|
||||||
|
registrationSystem.addCourseToSystem(c3);
|
||||||
|
|
||||||
|
Student st1 = new Student("Lionel Messi","404222010");
|
||||||
|
|
||||||
|
st1.addCourse(c1);
|
||||||
|
st1.addCourse(c2);
|
||||||
|
st1.addCourse(c3);
|
||||||
|
|
||||||
|
st1.dropCourse(c2);
|
||||||
|
|
||||||
|
st1.showRegisteredCourses();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user