import java.util.ArrayList; public class RegistrationSystem { private ArrayList courses; public RegistrationSystem() { courses = new ArrayList<>(); } public void addCourseToSystem(Course c) { // Add the course to the system courses.add(c); } public Course findCourseByCode(String code) { // Search for a course by course code for (Course c : courses) { if (c.getCourseCode().equals(code)) { return c; } } return null; } public void showAllCourses() { // Print all courses in the system for (Course c : courses) { System.out.println( c.getCourseName() + " - " + c.getCourseCode() + " | Remaining capacity: " + c.getCapacity() ); } } }