Files
WS-02-intro-to-oop-Arshida/src/CourseRegistrationStarter/Main.java
T
2026-04-20 11:33:10 +04:30

27 lines
955 B
Java

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 c1 = new Course("Python for beginners", "41842373", 10);
Course c2 = new Course("Advanced Python", "42842335", 22);
Course c3 = new Course("Java for beginners", "17289682", 7);
Student s1 = new Student("Barbod", "9341264180");
RegistrationSystem r1 = new RegistrationSystem();
r1.addCourseToSystem(c1);
r1.addCourseToSystem(c2);
r1.addCourseToSystem(c3);
s1.addCourse(c1);
s1.addCourse(c3);
s1.dropCourse(c1);
s1.showRegisteredCourses();
}
}