A console-based student management system built with C++ and STL containers for efficient data handling and academic record keeping.
This program simulates a university student management system with comprehensive CRUD operations, grade tracking, and statistical analysis. It demonstrates practical usage of C++ STL containers and algorithms.
- β Add new students with personal information
- β Remove students by ID
- β Search students by ID or name
- β Display all students
- β Filter students by faculty
- β Add grades for specific subjects
- β View all grades for a student
- β Calculate average grade across all subjects
- β Support for multiple subjects per student
- β Top 5 Students β ranked by average grade
- β Faculty Statistics β student count per faculty
- β Popular Subjects β most studied subjects
- β Excellent Students β students with average β₯ 90
- β Save all data to CSV file
- β Load data from CSV file
- β Automatic data validation
- C++11 (STL containers, algorithms, lambda functions)
- Data Structures:
std::map<int, Student>β fast student lookup by IDstd::map<string, vector<int>>β grades organized by subjectstd::vectorβ dynamic arrays for collectionsstd::pairβ for ranked data (ID + grade)
- Algorithms:
std::sortwith custom comparatorsstd::accumulatefor grade calculationsstd::find_iffor conditional search
- File I/O: CSV format for data persistence
- Open the project in Visual Studio
- Press
F5(Run)
g++ -std=c++11 main.cpp Menu.cpp StudentSystem.cpp -o student_system
./student_systemmkdir build && cd build
cmake ..
make
./student_systemstudent-management-system/
βββ main.cpp # Entry point
βββ Student.h # Student structure with operator overloads
βββ StudentSystem.h # Core system interface
βββ StudentSystem.cpp # Implementation of all features
βββ Menu.h # Menu interface
βββ Menu.cpp # Interactive console menu
βββ README.md # This file
βββ Students.txt # Sample data file (generated)
βββ screenshots/
βββ demo.gif
The system uses CSV format for data storage:
# Students
1,John Smith,20,Computer Science
2,Alice Brown,19,Physics
# Grades
1,Math,85,90,95
1,Programming,92,88
2,Math,92,88,90- Working with
std::mapfor associative arrays - Nested containers (
map<string, vector<int>>) - Efficient data lookup and manipulation
- Iterator patterns and best practices
- Custom sorting with lambda comparators
- Aggregate operations with
std::accumulate - Conditional filtering and searching
- Function overloading for flexible interfaces
- Separation of concerns (Menu, System, Data)
- Exception handling for error management
- File I/O with proper error checking
- CRUD operations implementation
- Menu-driven application architecture
- Data persistence and validation
- User input handling and validation
- Statistical calculations and ranking
=== STUDENT MANAGEMENT SYSTEM ===
1. Add Student
Enter choice: 1
--- Add Student ---
Name: John Smith
Age: 20
Faculty: Computer Science
--- Add Grade ---
Student ID: 1
Subject: Math
Grade: 92
--- Calculate Average ---
Student ID: 1
Average grade: 92.00
--- Top 5 Students ---
1. Student [1] have grade: 95.5
2. Student [3] have grade: 92.3
...
- Export statistics to JSON/XML
- GUI version using Qt or ImGui
- Unit tests with Google Test
- Database integration (SQLite)
- Multi-user support with authentication
- Grade history and trends
- Attendance tracking
MIT License β free to use and modify.
Oleksandr Kopii
GitHub: @SamuraiSanch
β If you found this project helpful, please give it a star!
