A standalone desktop application in Java to automate the generation of academic timetables.
This system allows department administrators to manage courses, lecturers, venues, and timeslots, and to generate, view, and export conflict-free timetables. The application follows a structured System Development Life Cycle (SDLC) and an iterative development approach.
The application provides a complete solution for academic timetable management with a user-friendly graphical interface and robust data management capabilities.
- Language: Java
- GUI: Java Swing for a rich desktop experience
- Data Persistence: JDBC for database connectivity
- Database: Support for either SQLite (lightweight, embedded) or MySQL (for a multi-user, server-based option)
- Lecturers Management: Add, update, and delete lecturers with attributes like ID, name, and rank (Professor, Associate Professor, Assistant Professor, Lecturer).
- Courses Management: Add, update, and delete courses with attributes like ID, title, level (ND/HND), and lab requirements.
- Venues Management: Add, update, and delete venues with attributes like ID, name, capacity, and type (Lecture Hall or Lab).
- Timeslots Management: Add, update, and delete timeslots with day of week and time range.
- Availability Management: Define lecturer availability by linking lecturers to specific timeslots.
- Constraint Checking: The core algorithm prevents hard constraints from being violated:
- Double-booking a lecturer at the same time
- Double-booking a venue at the same time
- Assigning a course to a venue that does not meet its capacity or type requirements
- Assigning a lecturer to a timeslot they are not available for
- Generation Algorithm: Implementation of a greedy algorithm to generate timetables
- Conflict Reporting: The system identifies and reports any unavoidable conflicts with suggested resolutions
- Timetable Display: View generated timetables in a clear, tabular format organized by days and time slots
- Export Functionality: Export timetables to common formats (CSV export functionality is implemented as a placeholder)
The application follows a three-layer architecture:
- Presentation Layer: Java Swing GUI providing an intuitive interface for non-technical users
- Application Logic Layer: Java core classes containing the scheduling algorithm and business rules
- Database Layer: JDBC layer for data access and persistence
The database schema is designed with the following key entities and their relationships:
Lecturer: Represents teaching staff with their attributesCourse: Represents academic courses with their requirementsVenue: Represents classrooms and labs with capacity and typeTimeslot: Represents time periods when classes can be scheduledAvailability: Links lecturers to timeslots they are availableTimetableEntry: Represents scheduled classes linking courses, lecturers, venues, and timeslots
The GUI features:
- Left-hand navigation menu for accessing different modules
- Main content area with forms for data entry
- Tabular views for displaying records with sortable and searchable tables
- Intuitive design for non-technical users
src/
├── main/
│ ├── java/
│ │ └── com/timetable/system/
│ │ ├── gui/
│ │ │ ├── MainWindow.java
│ │ │ ├── LecturerPanel.java
│ │ │ ├── CoursePanel.java
│ │ │ ├── VenuePanel.java
│ │ │ ├── TimeslotPanel.java
│ │ │ ├── AvailabilityPanel.java
│ │ │ └── TimetablePanel.java
│ │ ├── BaseEntity.java
│ │ ├── Course.java
│ │ ├── CourseDAO.java
│ │ ├── DAO.java
│ │ ├── DatabaseConnection.java
│ │ ├── DatabaseInitializer.java
│ │ ├── Lecturer.java
│ │ ├── LecturerDAO.java
│ │ ├── TimetableApplication.java
│ │ ├── TimetableEntry.java
│ │ ├── TimetableEntryDAO.java
│ │ ├── Timeslot.java
│ │ ├── TimeslotDAO.java
│ │ ├── Availability.java
│ │ ├── AvailabilityDAO.java
│ │ ├── Venue.java
│ │ └── VenueDAO.java
│ └── resources/
│ ├── database.properties
│ ├── schema.sql
│ └── schema-mysql.sql
└── test/
└── java/
See BUILDING.md for detailed instructions on how to build and run the application.
-
Build the application:
./build.sh
-
Run the application:
./run.sh
For detailed instructions on running the application on Windows, see Windows Installation Guide.
The application supports both SQLite and MySQL databases.
SQLite is the default database for simplicity and portability:
- The application automatically creates a
timetable.dbfile in the project directory - No additional setup is required
To use MySQL instead of SQLite:
- Open
src/main/resources/database.properties - Comment the SQLite lines and uncomment/modify these lines:
db.url=jdbc:mysql://localhost:3306/timetable db.user=your_username db.password=your_password - Make sure you have a MySQL server running and a database named
timetablecreated
All core modules have been implemented with full CRUD (Create, Read, Update, Delete) operations:
- Lecturer Management
- Course Management
- Venue Management
- Timeslot Management
- Lecturer Availability Management
- Timetable Generation
- Timetable Viewing
- Export Functionality (Placeholder)
This project is under active development. Contributions are welcome!
This project is licensed under the MIT License - see the LICENSE file for details.