diff --git a/src/main/java/org/example/se302/controller/MainController.java b/src/main/java/org/example/se302/controller/MainController.java
index 12c30ab..a91a48b 100644
--- a/src/main/java/org/example/se302/controller/MainController.java
+++ b/src/main/java/org/example/se302/controller/MainController.java
@@ -7,6 +7,12 @@ import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.scene.Node;
+import javafx.scene.control.Alert;
+import javafx.scene.control.ButtonType;
+import javafx.scene.control.ScrollPane;
+import javafx.scene.text.Text;
+import javafx.scene.text.TextFlow;
+import javafx.stage.Modality;
import org.example.se302.service.DataManager;
import java.io.IOException;
@@ -73,6 +79,9 @@ public class MainController {
@FXML
private Button themeToggleButton;
+ @FXML
+ private Button helpButton;
+
private DataManager dataManager;
private boolean isDarkMode = false;
@@ -304,4 +313,224 @@ public class MainController {
isDarkMode = true;
}
}
+
+ /**
+ * Show the help dialog with comprehensive documentation.
+ */
+ @FXML
+ private void onShowHelp() {
+ Alert helpDialog = new Alert(Alert.AlertType.INFORMATION);
+ helpDialog.setTitle("Help - Exam Scheduling System");
+ helpDialog.setHeaderText("📅 Exam Scheduling System - User Guide");
+ helpDialog.initModality(Modality.APPLICATION_MODAL);
+ helpDialog.initOwner(contentArea.getScene().getWindow());
+
+ String helpContent = """
+ ════════════════════════════════════════════════════════════════════════
+ EXAM SCHEDULING SYSTEM - COMPLETE USER GUIDE
+ ════════════════════════════════════════════════════════════════════════
+
+ This guide walks you through every feature of the Exam Scheduling System,
+ following the order you'll typically use them.
+
+
+ ══════════════════════════════════════════════════════════════════════════
+ 🚀 STEP 1: GETTING STARTED
+ ══════════════════════════════════════════════════════════════════════════
+
+ When you first open the application, you'll see the main interface with:
+
+ • SIDEBAR (Left): Navigation menu to access different sections
+ • CONTENT AREA (Center): Displays the current view
+ • STATUS BAR (Bottom): Shows loaded data counts
+ • HEADER (Top Right): Help (❓) and Theme Toggle (🌙/🌞) buttons
+
+ The sidebar buttons (Students, Courses, Classrooms, Schedule) are
+ disabled until you import your data files.
+
+
+ ══════════════════════════════════════════════════════════════════════════
+ 📁 STEP 2: IMPORTING YOUR DATA FILES
+ ══════════════════════════════════════════════════════════════════════════
+
+ The first step is to import your CSV data files. Click "Import Data"
+ in the sidebar (it's already selected by default).
+
+ You need to import 4 files in any order:
+
+ 1. STUDENT DATA (students.csv)
+ • Contains: Student ID, Student Name
+ • Format: id,name (one student per line)
+
+ 2. COURSE DATA (courses.csv)
+ • Contains: Course ID, Course Name, Duration (optional)
+ • Format: id,name,duration
+
+ 3. CLASSROOM DATA (classrooms.csv)
+ • Contains: Classroom ID, Classroom Name, Capacity
+ • Format: id,name,capacity
+
+ 4. ENROLLMENT DATA (enrollments.csv)
+ • Contains: Student ID, Course ID (links students to courses)
+ • Format: student_id,course_id
+
+ HOW TO IMPORT:
+ a) Click "Browse..." next to each file type
+ b) Select the corresponding CSV file from your computer
+ c) Repeat for all 4 files
+ d) Click "📥 Import All" to load all data at once
+ e) Check the "Import Messages" area for any errors or warnings
+
+ Once imported successfully, the sidebar buttons will become enabled,
+ and the status bar will show the count of loaded items.
+
+
+ ══════════════════════════════════════════════════════════════════════════
+ 📅 STEP 3: GENERATING A SCHEDULE
+ ══════════════════════════════════════════════════════════════════════════
+
+ Click "Schedule" in the sidebar to open the Auto Schedule Generator.
+
+ CONFIGURATION OPTIONS:
+
+ • Number of Days: How many exam days (e.g., 5-10 days)
+ • Slots per Day: Time slots each day (e.g., 3-5 slots)
+ • Start Date: When the exam period begins
+ • Slot Duration: Minutes per exam slot (e.g., 60, 90, 120)
+ • Day Start Time: When the first exam starts (e.g., 09:00)
+ • Optimization Strategy: Algorithm approach for scheduling
+ • Allow Back-to-Back: Whether students can have consecutive exams
+
+ GENERATING THE SCHEDULE:
+ a) Adjust the configuration settings as needed
+ b) Click "🚀 Generate Schedule"
+ c) Wait for the algorithm to complete (progress shown)
+ d) View the generated schedule in the grid below
+
+ The schedule grid shows:
+ • Rows = Time slots
+ • Columns = Days
+ • Each cell = Exam assignment with course and classroom
+
+ EDITING THE SCHEDULE:
+ • DRAG & DROP: Click and drag any exam to a different time slot
+ • EDIT DETAILS: Click on an exam to open the edit dialog
+ • The system will warn you about conflicts (student overlap, etc.)
+
+ EXPORTING:
+ • Click "📥 Export CSV" to save the schedule as a spreadsheet
+
+
+ ══════════════════════════════════════════════════════════════════════════
+ 👤 STEP 4: VIEWING STUDENT INFORMATION
+ ══════════════════════════════════════════════════════════════════════════
+
+ Click "Students" in the sidebar - it expands to show two options:
+
+ STUDENT LIST:
+ • View all imported students in a table
+ • See each student's ID and name
+ • Search or filter students (if available)
+
+ STUDENT SCHEDULE:
+ • Select a specific student to view their personal exam timetable
+ • See which exams they're enrolled in
+ • View dates, times, and classroom locations
+
+
+ ══════════════════════════════════════════════════════════════════════════
+ 📚 STEP 5: VIEWING COURSE INFORMATION
+ ══════════════════════════════════════════════════════════════════════════
+
+ Click "Courses" in the sidebar - it expands to show two options:
+
+ COURSE LIST:
+ • View all courses with details
+ • See enrollment counts (how many students per course)
+ • View assigned classrooms and times
+
+ COURSE SCHEDULE:
+ • View exam schedule organized by course
+ • See when and where each course exam takes place
+ • Useful for faculty and exam coordinators
+
+
+ ══════════════════════════════════════════════════════════════════════════
+ 🏛️ STEP 6: VIEWING CLASSROOM INFORMATION
+ ══════════════════════════════════════════════════════════════════════════
+
+ Click "Classrooms" in the sidebar - it expands to show two options:
+
+ CLASSROOM LIST:
+ • View all classrooms with their capacities
+ • See which classrooms can fit which courses
+ • Useful for room planning
+
+ CLASSROOM SCHEDULE:
+ • View exam schedule organized by room
+ • See what exams are in each classroom
+ • Useful for room coordinators and proctors
+
+
+ ══════════════════════════════════════════════════════════════════════════
+ 🌙 THEME TOGGLE
+ ══════════════════════════════════════════════════════════════════════════
+
+ Click the moon (🌙) or sun (🌞) icon in the top-right corner to switch
+ between Light Mode and Dark Mode for your viewing preference.
+
+
+ ══════════════════════════════════════════════════════════════════════════
+ 💡 TIPS & BEST PRACTICES
+ ══════════════════════════════════════════════════════════════════════════
+
+ 1. PREPARE YOUR DATA: Make sure your CSV files are correctly formatted
+ before importing. Check column headers match expected format.
+
+ 2. START WITH DEFAULTS: Use default schedule settings first, then
+ adjust based on results.
+
+ 3. REVIEW CONFLICTS: After generating, check for any warnings about
+ student conflicts or capacity issues.
+
+ 4. SAVE YOUR WORK: Export your schedule to CSV regularly so you
+ don't lose your progress.
+
+ 5. USE STUDENT VIEW: To verify no single student has exam conflicts,
+ check individual student schedules.
+
+ 6. CLASSROOM CAPACITY: Ensure classrooms can fit all enrolled students
+ by checking the Classroom List view.
+
+
+ ══════════════════════════════════════════════════════════════════════════
+ ❓ NEED MORE HELP?
+ ══════════════════════════════════════════════════════════════════════════
+
+ If you encounter issues:
+ • Check the Import Messages for data errors
+ • Verify your CSV files are properly formatted
+ • Try with fewer constraints if schedule generation fails
+ • Increase number of days or slots if courses don't fit
+ """;
+
+ // Create a scrollable TextArea for the help content
+ javafx.scene.control.TextArea textArea = new javafx.scene.control.TextArea(helpContent);
+ textArea.setEditable(false);
+ textArea.setWrapText(true);
+ textArea.setStyle("-fx-font-family: 'Segoe UI', sans-serif; -fx-font-size: 13px;");
+
+ // Set the TextArea as expandable content
+ helpDialog.getDialogPane().setExpandableContent(null);
+ helpDialog.getDialogPane().setContent(textArea);
+
+ // Make dialog larger with fixed size
+ helpDialog.getDialogPane().setMinWidth(750);
+ helpDialog.getDialogPane().setMinHeight(600);
+ helpDialog.getDialogPane().setPrefWidth(750);
+ helpDialog.getDialogPane().setPrefHeight(600);
+ helpDialog.setResizable(false);
+
+ helpDialog.showAndWait();
+ }
}
diff --git a/src/main/resources/org/example/se302/css/application.css b/src/main/resources/org/example/se302/css/application.css
index b6c57c4..d50c754 100644
--- a/src/main/resources/org/example/se302/css/application.css
+++ b/src/main/resources/org/example/se302/css/application.css
@@ -824,6 +824,33 @@
-fx-border-color: #334155;
}
+/* Header Icon Buttons (Help, Theme Toggle) */
+.header-icon-button {
+ -fx-background-color: transparent;
+ -fx-text-fill: #1E293B;
+ /* slate-800 - dark for light mode */
+ -fx-border-color: transparent;
+ -fx-border-width: 0;
+ -fx-padding: 8;
+ -fx-font-size: 18px;
+ -fx-cursor: hand;
+}
+
+.header-icon-button:hover {
+ -fx-text-fill: #4F46E5;
+ /* primary indigo on hover */
+}
+
+.root.dark .header-icon-button {
+ -fx-text-fill: white;
+ /* white for dark mode */
+}
+
+.root.dark .header-icon-button:hover {
+ -fx-text-fill: #A5B4FC;
+ /* lighter indigo on hover in dark mode */
+}
+
/* Header */
.root.dark .header {
-fx-background-color: linear-gradient(to right, #4338CA, #6366F1);
diff --git a/src/main/resources/org/example/se302/view/main-view.fxml b/src/main/resources/org/example/se302/view/main-view.fxml
index 5532c94..c797be1 100644
--- a/src/main/resources/org/example/se302/view/main-view.fxml
+++ b/src/main/resources/org/example/se302/view/main-view.fxml
@@ -16,9 +16,12 @@
-
+
+
+
+ styleClass="header-icon-button"/>