High-Level Solution / System Design Overview¶
The system analyzes student course registration data to compute course demand using efficient data structures and sorting algorithms. It follows a multi-phase workflow designed for correctness, traceability, and runtime efficiency.
System Overview¶
-
Reading¶
Purpose: Load and validate data from
Input.txt
Handled by:FileService.java,InputValidator.javaInput format:
studentID;courseID;academicLevel;regTimeOutput: Valid
Registrationobjects stored in a custom linked list -
Processing¶
Purpose: Compute a demand score for each registration
Handled by:DemandScorer.javaOutput: Each linked-list node enriched with a demand score
-
Writing¶
Purpose: Export processed data before sorting
Handled by:FileService.javaOutput file:
Output.txt(same format + demand score) -
Sorting & Benchmarking¶
Purpose: Sort registrations by demand score and compare runtimes
Handled by:SelectionSort.java,InsertionSort.java,MergeSort.java,QuickSort.java,Benchmarker.java/Timer.javaOutputs: Sorted result files per algorithm + runtime comparison
Phase 1 — Reading¶
Purpose: Load and validate data from Input.txt
Handled by: FileService.java and InputValidator.java
Phase 2 — Processing¶
Purpose: Compute a demand score for each registration
Handled by: DemandScorer.java
-
Base Score¶
All registrations start with a base score of 50.
-
Academic Level Multiplier¶
- Freshman → ×0.75
- Sophomore → ×0.90
- Junior → ×1.10
- Senior → ×1.25
- Graduate → ×1.50
-
Registration Time Factor¶
- +10 points (8–10 AM)
- +5 points (6–8 AM)
- 0 points (12–2 PM)
- −5 to −15 points (late afternoon/evening)
-
Course ID Priority¶
- Odd course codes → +20 points
- Even course codes → −10 points
The final demand score is computed and stored inside each Registration node.
Phase 3 — Writing¶
Purpose: Export processed data to a text file before sorting
Handled by: FileService.java
Phase 4 — Sorting and Benchmarking¶
Purpose: Sort by demand score and measure execution time
Handled by: Sorting and benchmarking classes
-
Sorting Algorithms¶
SelectionSort.javaInsertionSort.javaMergeSort.javaQuickSort.java
-
Benchmarking¶
Measures and compares runtime using a benchmark utility (
Benchmarker.java/Timer.java). -
Sorted Outputs¶
Exports sorted results to:
Sorted_Output_SS.txtSorted_Output_IS.txtSorted_Output_MS.txtSorted_Output_QS.txt
Flow of Execution¶
The complete program flow is illustrated in the system flowchart below:
Diagram
