AnkurGaur2007 GitHub avatar

Smart-Timetable-Generator

AnkurGaur2007

一个使用回溯算法生成无冲突大学课程表的Java控制台应用程序,展示了面向对象编程和基于约束的调度。

Stars

12

7 天增长

暂无数据

Fork 数

0

开放 Issue

0

开源协议

暂无数据

最近更新

2026-07-14

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它提供了一个清晰且文档完善的回溯算法应用实例,特别注重代码可读性和计算机科学学生的学习体验。

适合谁使用

  • 学习数据结构和Java的大二计算机科学学生
  • 学习回溯算法和约束满足的学生
  • 需要简单课程表生成示例的教育工作者
  • 对面向对象编程和递归感兴趣的自学者

典型使用场景

  • 根据课程、教室和时段输入生成每周大学课程表
  • 在控制台应用程序中演示递归回溯算法
  • 练习具有清晰类职责划分的面向对象设计
  • 理解教师、教室和实验室冲突的约束检查

项目优势

  • 无冲突生成,支持教师、教室和实验室冲突检测
  • 初学者友好的代码,类职责清晰且附带注释
  • 随机时段排序以获得更均匀的课程表分布
  • 控制台界面,输入输出简单

使用前须知

  • 指数级最坏时间复杂度,处理大规模输入时可能性能不佳
  • 无持久化:退出后数据丢失(无文件或数据库)
  • 仅使用固定的默认教室和时段,不修改代码无法配置

README 快速开始

Smart Timetable Generator

A Java console application that generates clash-free university timetables using the Backtracking algorithm. The project demonstrates object-oriented design, recursion, and constraint-based scheduling in a simple, beginner-friendly implementation.

Smart Timetable Generator

Smart Timetable Generator is a console-based Java project that creates a university timetable by placing subjects into valid room and time-slot combinations.

I built this project to practice:

  • Object-Oriented Programming
  • recursion
  • Backtracking
  • constraint checking
  • clean class design

The idea is simple: given a set of subjects, rooms, and time slots, the program tries to build a timetable without clashes.

This project is meant to be easy to read and understand, especially for a second-year Computer Science student who is learning DSA and Java design basics.


Features

  • Clash-free timetable generation
  • Recursive Backtracking algorithm
  • Faculty conflict detection
  • Room conflict detection
  • Lab and classroom validation
  • Automatic timetable printing
  • Console-based interface
  • Randomized time-slot ordering for better timetable distribution
  • Multiple timetable generation
  • Simple statistics after generation

Technologies Used

  • Java 17
  • Object-Oriented Programming
  • Backtracking
  • Java Collections
  • Console Application

Project Structure

Smart Timetable Generator Project/
├── README.md
└── src/
    ├── Subject.java
    ├── Room.java
    ├── Day.java
    ├── TimeSlot.java
    ├── Lecture.java
    ├── Timetable.java
    ├── ConstraintChecker.java
    ├── TimeSlotGenerator.java
    ├── InputManager.java
    ├── ConsoleHelper.java
    ├── TimetablePrinter.java
    ├── Scheduler.java
    └── Main.java

What each class does

  • Subject.java
    • stores subject name, faculty name, lectures per week, and lab status
  • Room.java
    • stores room name, capacity, and whether the room is a lab
  • Day.java
    • enum for Monday to Friday
  • TimeSlot.java
    • stores one day and one slot number
  • Lecture.java
    • combines one subject, one room, and one time slot
  • Timetable.java
    • stores all scheduled lectures
  • ConstraintChecker.java
    • checks whether a lecture can be placed
  • TimeSlotGenerator.java
    • creates all possible teaching slots and can shuffle them
  • InputManager.java
    • reads user input and

项目描述

A Java-based Smart Timetable Generator that uses backtracking to create conflict-free university schedules with support for room allocation, faculty availability, and timetable visualization.

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

oversecured
oversecured GitHub avatar

Samsung_Vulnerabilities

Oversecured discloses a report of 176 vulnerabilities discovered in Samsung preinstalled apps between 2022 and 2025, with 140 detailed, all fixed in collaboration with Samsung.

Java
310
wxxsfxyzm
wxxsfxyzm GitHub avatar

MiuiBackGestureHook

An LSPosed module that hooks MIUI SystemUI back gestures using modern Xposed API 102 for research and customization.

Java
86
SangLuoCN
SangLuoCN GitHub avatar

OneStep4

OneStep4.0 is a multi-window desktop container for Android that requires root or system-level privileges, enabling a main window with several side windows for efficient app multitasking.

Java
84