How ahmedelbaramony/student-managment-system works
Project type and purpose
• This is a desktop-only, monolithic “Student Management System” written in C++/Qt.
• It provides a GUI for managing students, subjects, grades, and computing statistics (GPA, mean, median, mode, standard deviation).
File structure
• Top-level directory “StudentGradeChecker” contains:
• CMakeLists.txt (build configuration)
• main.cpp + mainwindow.* (application entry point and main UI)
• addstudent.*, removestudent.*, searchstudent.*, registersubjects.*, removesubject.*, subjectcalculations.* (individual dialog modules)
• classes.cpp/h (domain models for Student, Subject, Enrollment)
• Debug build subdirectory holds CMake/Ninja artifacts, generated MOC code, and two flat text files (students.txt, subjects.txt) used for persistence.
Extract architectural insights from the README
• Qt GUI for user interaction.
• Business rules around subject and student management are handled in C++ classes.
• Persistence via plain text files.
Main components
a. Presentation Layer (Qt UI)
– MainWindow
– Dialog modules: AddStudentDialog, RemoveStudentDialog, SearchStudentDialog, RegisterSubjectsDialog, RemoveSubjectDialog, SubjectCalculationsDialog
b. Domain Layer (Business Logic)
– classes.cpp/h: StudentManager, SubjectManager, EnrollmentManager
– subjectcalculations.cpp/h: StatisticsCalculator
c. Data Layer (Persistence)
– FileStorage: students.txt, subjects.txt reader/writer
d. Build & Generation (auxiliary)
– CMake (CMakeLists.txt) + Qt MOC (auto-gen code)
Relationships & data flows
• UI components invoke Domain Layer APIs to: add/edit/remove entities or compute statistics.
• Domain Layer calls FileStorage to load/save data.
• FileStorage reads/writes the text files on disk.
• At startup MainWindow → DomainLayer.loadAll() → FileStorage.readFiles().
• On dialog “OK” → DomainLayer.updateXXX() → FileStorage.writeFiles() → UI refresh.
Architectural patterns & design principles
• Layered (Presentation → Business → Persistence)
• MVC/MVP flavor:
– View = Qt UI classes
– Model = classes.cpp/h (Student/Subject objects + collections)
– Controller = mainwindow.cpp and dialog controllers
• Single responsibility: each dialog/module handles one use case.
• Plain-text file storage (no DB), so persistence is simple sequential I/O.