Loading LLD design...
Design an object-oriented course registration system for a university that supports a course catalogue with prerequisites, per-semester course offerings (sections) with time slots and capacity limits, multi-step enrollment validation, waitlist management, and academic grading.
Enrollment validates five conditions: (1) student is active, (2) prerequisites are completed, (3) credit limit is not exceeded, (4) no schedule conflict with current courses, and (5) the course is not full (otherwise waitlisted). Dropping a course auto-promotes the first waitlisted student. Time slots use day + start/end times with overlap detection for conflict checking.
Manage course catalogue
Add courses with code, name, credits, department, and prerequisites
Create course offerings
Create sections with instructor, room, time slots, capacity for a semester
Enroll student
Enroll after validating prerequisites, credit limit, schedule conflicts, and capacity
Drop course
Drop a student from an offering and auto-promote from waitlist
Waitlist management
Automatically waitlist when course is full; promote when a seat opens
Schedule conflict detection
Prevent enrollment if time slots overlap with any currently enrolled course
Prerequisite validation
Verify all prerequisite courses are completed before enrollment
Credit limit enforcement
Ensure total credits don't exceed the student's per-semester max
Grading and transcript
Assign grades at semester end; generate academic transcript
Before diving into code, clarify the use cases and edge cases. Understanding the problem deeply leads to better class design.
Identify the primary actions users will perform. For a parking lot: park vehicle, exit vehicle, check availability. Each becomes a method.
Who interacts with the system? Customers, admins, automated systems? Each actor type may need different interfaces.
What are the limits? Max vehicles, supported vehicle types, payment methods. Constraints drive your data structures.
What happens on overflow? Concurrent access? Payment failures? Thinking about edge cases reveals hidden complexity.