A console-based Student Management System written in modern C++ with support for JSON persistence, fast lookups, undo/redo functionality, and flexible search.
-
Add / delete / update students
-
View all students
-
Search by:
- ID
- Name
- Surname
- Full-text query (multi-word search)
- O(1) student lookup by ID using
unordered_map - Optimized deletion without shifting elements
- Data is stored in JSON format
- Automatic load/save from file
- Full state history
- Supports reverting and reapplying actions
-
Case-insensitive search
-
Partial matches supported
-
Multi-word query search:
Jon Snowmatches:
Jon Snow Snow Jon
-
Sort by:
- ID
- GPA
- Age
- Name
- Surname
- Filter by GPA
- Filter by age range
std::vector<Student>— main storagestd::unordered_map<int, int>— index for O(1) accesshistory/redoStack— state snapshots for undo/redo
| Operation | Complexity |
|---|---|
| Add student | O(1) |
| Get by ID | O(1) |
| Delete | O(1) |
| Search | O(n) |
| Sort | O(n log n) |
.
├── main.cpp
├── Student.h / Student.cpp
├── StudentManager.h / StudentManager.cpp
├── students.json
└── json.hpp (nlohmann/json)
- C++
- STL (
vector,unordered_map,algorithm) - nlohmann/json
g++ main.cpp Student.cpp StudentManager.cpp -o app./app[
{
"id": 1,
"name": "Jon",
"surname": "Snow",
"age": 20,
"gpa": 4.5
}
]- Working with STL containers
- Designing efficient data structures (indexing)
- Implementing undo/redo systems
- File persistence with JSON
- Writing modular and maintainable C++ code
- GUI (Qt / ImGui)
- Database integration (SQLite)
- Unit tests
- CLI arguments support
- Export/import CSV
GitHub: https://github.com/Skyl1te
Give it a star and feel free to contribute!