UNIVERSITY OF GONDAR (UOG)
Institute of Technology
Department of Computer Engineering
Course: Introduction to Programming (C++)
Assignment #: 02
Weight: 10%
Semester: 2nd Semester, 2026
Assignment Title: Advanced Functions Implementation
and Modular Programming in C++
Instructions (Read Carefully – Penalties Apply)
• You must submit a single C++ file named: YourStudentID_Functions.cpp
(Example: UOG123456_Functions.cpp )
• Your UOG Student ID must be used meaningfully in the program.
• Only concepts taught in class are allowed (no advanced libraries or STL algorithms).
• You must be prepared for a viva voce (oral examination) to explain your code.
• Late submission penalty: 2% per day.
• Plagiarism / AI-generated code = Zero marks.
Problem: Student Performance Analysis System
Develop a modular C++ program using multiple user-defined functions to analyze the academic
performance of 10 students (including yourself).
Required Functions (You must implement all of them)
1. void displayHeader(string studentID)
Displays a well-formatted header containing Student ID, your name, course, and date.
2. double calculateGradePoint(double marks[], int size = 5)
Takes an array of marks for 5 subjects. Returns GPA on a 4.0 scale using the mapping: 90–100
= 4.0, 80–89 = 3.5, 70–79 = 3.0, 60–69 = 2.5, 50–59 = 2.0, <50 = 0.0. Must use loops and a
default argument for size.
3. void sortAndRankStudents(double gpas[], string names[], int n)
Sorts students by GPA (descending) using Bubble Sort (manual implementation). Displays
ranked list with Rank, Name, and GPA.
4. double predictNextSemesterGPA(double currentGPA, int
improvementFactor)
Recursive function. Base case: If improvementFactor == 0 , return currentGPA .
Otherwise, improve GPA by 0.1 and recurse. Add protection against excessive recursion.
5. Function Overloading: generateReport
- Version 1: Takes single student details (name, gpa, rank).
- Version 2: Takes arrays and prints full class report.
Additional Requirements (Mandatory for Full Marks)
• Input validation: Marks must be between 0 and 100.
• Memory/Logic: Use pass by value and pass by reference appropriately.
• File I/O: Save the final ranked report to YourStudentID_Report.txt .
• Documentation: Sufficient comments and a reflection comment block (150–200 words) at
the top.
Expected Output Format
=== UNIVERSITY OF GONDAR - STUDENT PERFORMANCE SYSTEM ===
Student ID : UOG123456/12
Student Name : ________________
Date : ________________
===== CLASS RANKING =====
Rank 1 : StudentName - GPA: 3.85
Rank 2 : ...
...
Your Predicted Next Semester GPA : 3.55
Report successfully saved to UOG123456_Report.txt
Marking Rubric (Total 10 Marks)
No. Component Marks
1 Correct implementation of all functions + overloading 3.0
2 Recursion, Bubble Sort, Pass by Reference 2.0
3 File I/O + Input Validation 1.5
4 Code Structure, Comments & Modularity 1.0
5 Viva / Oral Examination 2.0
6 Originality & Use of Student ID 0.5
Prepared by: Computer Engineering Date: May 2026