The CMS-tkinter project is a Course Management System built using Python's tkinter library for the graphical user interface and JSON for data persistence. Here's a comprehensive breakdown of how it works:
The system provides complete student lifecycle management with the following core functions:
- Add Student: Creates new student records with ID, name, and semester information
- Delete Student: Removes student records from the system
- View Students: Displays all registered students with their basic information
The system implements a sophisticated course management system with business rules:
- Course Registration: Allows students to register for courses with type validation (DC/DE)
- Course Limits: Enforces business rules limiting students to maximum 4 DC courses and 2 DE courses
- Course Dropping: Enables students to drop registered courses
- Course Viewing: Displays all courses a specific student is registered for
The system includes comprehensive validation mechanisms:
- Duplicate student ID prevention
- Course type validation ensuring only "DC" or "DE" types are accepted
- Duplicate course registration prevention
The GUI uses a grid-based layout with organized sections:
- LabelFrame containers for grouping related functionality
- Fixed window size to maintain consistent layout
The interface is organized into six main functional areas:
- Add Student Section: Input fields for student ID, name, and semester
- Register Course Section: Fields for student ID, course ID, and course type
- Drop Course Section: Interface for removing course registrations
- Delete Student Section: Simple interface for student removal
- View Students Section: Button to display all students
- View Courses Section: Interface to view courses for a specific student
The application uses messagebox dialogs to provide immediate feedback for all user actions
The system uses a dual-layer data architecture:
- Runtime Storage: Global dictionary (
students) for in-memory operations - Persistent Storage: JSON file (
students.json) for permanent data storage
- Load Operation: Reads existing data from JSON file at application startup
- Save Operation: Writes current state to JSON file after every data modification
- Automatic Persistence: Every CRUD operation automatically triggers data saving
The JSON storage follows a hierarchical structure where each student record contains:
- Basic information (ID, name, semester)
- Nested courses object mapping course IDs to course types
The main application flow follows this pattern:
- Data Loading: Application starts by loading existing data
- GUI Creation: Main window with all interface components is created
- Event Loop: Tkinter mainloop handles user interactions
The CMS-tkinter project is a well-structured educational management application that demonstrates good separation of concerns between data management, business logic, and user interface. The system enforces academic constraints (course limits) while providing a user-friendly interface for managing student-course relationships. The JSON-based persistence ensures data survives application restarts, making it suitable for real-world educational institution use cases at a small to medium scale.