A Windows-oriented console application for managing student records through a simple, menu-driven interface. The system supports creating, editing, deleting, searching, and displaying student records while calculating total marks and average grades automatically.
Project status: This repository contains the original C++ source code and a pre-built Windows executable. The application is suitable for learning, coursework, and small local record-management scenarios.
The application stores student records in a text file and loads the available records when it starts. Any changes made through the application are written back to the storage file automatically.
The current implementation is designed primarily for Windows because it uses a Windows-style data path and the cls console command. Before running the program, make sure that the configured data location is available on your machine.
| Capability | Description |
|---|---|
| Add records | Create a new student record and enter marks for six subjects. |
| Edit records | Update the personal information, major, level, and marks of an existing record. |
| Delete records | Remove a student record by student ID. |
| Search | Find a record by first name or student ID. |
| Sort and display | Display all records sorted by ID, first name, or total marks. |
| Automatic calculations | Calculate total marks and the average grade from six subject marks. |
| Automatic persistence | Save changes to the configured text file after add, edit, or delete operations. |
Each record contains the following information:
| Field | Description | Validation or calculation |
|---|---|---|
| Student ID | Numeric identifier for the student. | Entered by the user. |
| First name | Student's first name. | Alphabetic characters only; the current input accepts one word. |
| Last name | Student's last name. | Alphabetic characters only; the current input accepts one word. |
| Major | Student's academic major. | Must be one of IT, IS, CS, or CYS. |
| Level | Academic level. | Must be an integer from 1 to 4. |
| Subject marks | Marks for six subjects. | Each mark must be between 1 and 100. |
| Total marks | Sum of the six subject marks. | Calculated automatically. |
| Average grade | Average of the six subject marks. | Calculated automatically as total marks / 6. |
To run the included executable, use a Windows environment compatible with project.exe. To build the application from source, use a C++ compiler that supports the current source implementation and the C++ standard library.1
The application currently expects its data file at:
D:/students.txt
If the D: drive does not exist, either create the required location or change the path in the load() and save_in_file() functions in project.cpp before compiling.
git clone https://github.com/IBR4NX/student-records-cpp.git
cd student-records-cppCreate an empty file named students.txt inside the root of the D: drive:
D:/students.txt
The application reads existing records from this file when it starts. If the file is not accessible, loading and saving records may fail.
From a Windows Command Prompt or PowerShell terminal, run:
.\project.exeWith a compatible GCC or MinGW-w64 toolchain, compile the source with:
g++ -std=c++17 project.cpp -o project.exeThen run the generated executable:
.\project.exeCompiler compatibility note: The current source uses Windows-oriented behavior such as
system("cls")and a case-insensitive string comparison function. Depending on the compiler and platform, these implementation details may require small portability adjustments before the source builds successfully.1 2
When the program starts, it presents the following operations:
| Option | Operation |
|---|---|
| 1 | Add a new student record |
| 2 | Edit a student record |
| 3 | Delete a student record |
| 4 | Search for a student |
| 5 | Display all student records |
| 6 | Exit the application |
The display menu provides three ordering options: student ID in ascending order, first name in alphabetical order, and total marks in descending order.
Records are stored as space-separated values. A serialized record follows this structure:
<student_id> <first_name> <last_name> <major> <level> <total_marks> <average_grade>
Example:
1001 Sara Ali CS 2 510 85
The six individual subject marks are entered by the user and used to calculate the total and average. In the current implementation, the data file stores the calculated total and average rather than the six subject marks separately.
student-records-cpp/
βββ project.cpp # C++ source code
βββ project.exe # Pre-built Windows executable
βββ README.md # Project documentation
The runtime data file is stored outside the repository at D:/students.txt unless the path is changed in the source code.
The application applies the following input checks:
- Names must contain alphabetic characters.
- Majors must be
IT,IS,CS, orCYS. - Academic levels must be between
1and4. - Subject marks must be between
1and100. - The in-memory record array has a maximum capacity of
100students.
The current version is intentionally simple and has several limitations that may be useful to address in future improvements:
- The storage path is hard-coded as
D:/students.txt. - The application uses a fixed-size in-memory array with a capacity of 100 records.
- First and last names are read as single words, so names containing spaces are not supported by the current input flow.
- Individual subject marks are not persisted in the text file; only the total and average are saved.
- The program is optimized for a Windows console and is not fully portable to Linux or macOS without code changes.
- The current implementation does not provide a dedicated validation check for duplicate student IDs.
- There is no authentication, multi-user access control, or database backend.
Future versions could replace the fixed-size array with std::vector, move the storage path to a configuration file, persist all subject marks, support names containing spaces, validate duplicate IDs, and replace the text-file format with a structured format or database. Separating the user interface, validation, storage, and business logic into distinct modules would also improve maintainability and testability.
Contributions are welcome. When proposing a change, describe the problem being solved, keep the implementation focused, update the documentation when behavior changes, and verify the application manually on a supported Windows environment.
No license file is currently included in this repository. Unless a license is added by the project owner, reuse, modification, and redistribution rights should be considered unspecified.