C++ Programming II - Project Assignment
Spring 2026
C++ Project Assignment
Student Grade Management System Using Classes
Course C++ Programming
Topic Classes, Objects, Constructors, and Menus
Total Marks 10 Marks
Submission Items Source code file, screenshot, short explanation, and video demonstration
Due Date 2026-June-04
1. Project Description
Create a C++ program called Student Grade Management System. The program must use classes and
must store student grades in a two-dimensional double array. The purpose of this project is to practice
classes, objects, encapsulation, constructors, fixed-size arrays, 2D array indexing, loops, conditions, and
menu-based programming.
2. Learning Objectives
• Design C++ classes using private data members and public member functions.
• Create and use objects to represent students and grade management.
• Use constructors to initialize object data.
• Store grades using a two-dimensional double array: grades[studentIndex][gradeIndex].
• Use a separate counter array to track how many grades each student has.
• Create a menu-driven program that continues running until the user exits.
3. Required Data Structure
The program must use a two-dimensional double array for grades:
const int MAX_STUDENTS = 10;
const int MAX_GRADES = 5;
double grades[MAX_STUDENTS][MAX_GRADES];
int gradeCount[MAX_STUDENTS];
Meaning:
• Each row represents one student.
• Each column represents one grade for that student.
• grades[0][0] is the first grade of the first student.
• grades[1][2] is the third grade of the second student.
• gradeCount[i] stores how many grades student i currently has.
C++ Programming II - Project Assignment
Spring 2026
Student Index grades[i][0] grades[i][1] grades[i][2] gradeCount[i]
0 90 85 - 2
1 70 75 80 3
2 95 - - 1
4. Required Class Design
Variable Type Description
names[MAX_STUDENTS] string Stores student names
ids[MAX_STUDENTS] int Stores student IDs
grades[MAX_STUDENTS][MAX_GRADES] double Stores grades using a 2D array
gradeCount[MAX_STUDENTS] int Stores how many grades each student has
studentCount int Stores the current number of students
Function Return Type Description
StudentGradeSystem() Constructor Initializes the system
findStudentIndexByID(int id) int Searches for a student by ID and returns the index
addStudent() void Adds a new student name and ID
addGradeToStudent() void Adds a grade for a selected student
calculateAverage(int index) double Calculates the average grade of a student
getStatus(int index) string Returns Passed or Failed
displayStudent(int index) void Displays one student’s information
displayAllStudents() void Displays all students
searchStudentByID() void Searches and displays a student by ID
#include <iostream>
#include <string>
using namespace std;
const int MAX_STUDENTS = 10;
const int MAX_GRADES = 5;
class StudentGradeSystem {
private:
string names[MAX_STUDENTS];
int ids[MAX_STUDENTS];
double grades[MAX_STUDENTS][MAX_GRADES];
int gradeCount[MAX_STUDENTS];
int studentCount;
public:
StudentGradeSystem();
int findStudentIndexByID(int id);
void addStudent();
void addGradeToStudent();
double calculateAverage(int index);
string getStatus(int index);
void displayStudent(int index);
void displayAllStudents();
void searchStudentByID();
C++ Programming II - Project Assignment
Spring 2026
5. Required Program Menu
The program should display the following menu and continue running until the user chooses Exit:
===== Student Grade Management System =====
1. Add Student
2. Add Grade to Student
3. Display All Students
4. Search Student by ID
5. Exit
Enter your choice:
6. Required Features
Feature 1: Add Student: The user enters the student name and ID. The program stores the new student
in the students array and increases studentCount.
Feature 2: Add Grade to Student: The user enters a student ID. If the student is found, the program
adds the grade to grades[studentIndex][gradeCount[studentIndex]].
Feature 3: Prevent Array Overflow: The program must not add more than MAX_STUDENTS students or
more than MAX_GRADES grades for each student.
Feature 4: Calculate Average: The average is calculated using the grades in the correct row of the 2D
array.
Feature 5: Pass or Fail: A student passes if the average is 60 or above. Otherwise, the student fails.
Feature 6: Display and Search: The program displays all students and allows searching for a student by
ID.
7. Sample Output
===== Student Grade Management System =====
1. Add Student
2. Add Grade to Student
3. Display All Students
4. Search Student by ID
5. Exit
Enter your choice: 1
Enter student name: Ahmed
Enter student ID: 101
Student added successfully!
Enter your choice: 2
Enter student ID: 101
Enter grade: 90
Grade added successfully!
Enter your choice: 3
Student Information
-------------------
Name: Ahmed
ID: 101
Grades: 90
C++ Programming II - Project Assignment
Spring 2026
Average: 90
Status: The student Passed
8. Marking Rubric - 10 Marks
Criteria Marks
Correct use of classes, especially Student and GradeBook, and Correct use of private
2
variables and public functions.
Add student, add grade, search, and display features work correctly 2
Average calculation and pass/fail status are correct 1
Program menu, loop, input handling, and overall organization 2
Video demonstration of the code running and brief explanation 3
Total 10
9. Submission Requirements
1. Submit the C++ source code file named [Link].
2. Submit a screenshot showing the program running successfully.
3. Submit a short written explanation of the classes, the 2D grades array, and the main functions.
4. Submit a short video demonstration showing the code, successful compilation, and program execution.
10. Video Demonstration Requirements
• Show the code in the editor.
• Compile and run the program successfully.
• Add at least two students.
• Add at least two grades for each student.
• Display all students.
• Search for one student by ID.
• Briefly explain how grades are stored using grades[studentIndex][gradeIndex].
11. Student Task
Write the complete C++ program using classes and the 2D double array grades[MAX_STUDENTS][MAX_GRADES].
Test the program with at least two students and show that all menu options work correctly.
12. Bonus Challenge – 2 Extra Marks
For extra practice, add a function that returns the highest grade for a selected student:
double getHighestGrade(int studentIndex);
Then update displayStudentInfo() to show the highest grade. Example:
Highest Grade: 95