develop #1

Merged
MehrdadShirvani merged 3 commits from develop into main 2026-05-15 12:36:26 +00:00
Showing only changes of commit 3195b392af - Show all commits
+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();
}
}