changes in class Main

This commit is contained in:
2026-04-20 22:59:57 +03:30
parent cd3436131d
commit 3195b392af
+21 -9
View File
@@ -1,14 +1,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
public static void main(String[] args)
{
Course c1 = new Course("Advanced Programming","4041",40);
Course c2 = new Course("Math","4042",50);
Course c3 = new Course("English","4043",20);
RegistrationSystem registrationSystem = new RegistrationSystem();
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();
}
}