Functions Assignment
Functions Assignment
Registration no 2021-KIU-Bs5509
Assigment 03
Assignment: Understanding and Implementing Functions in Programming
Objective
To develop students' understanding of functions in programming, including the concepts of
function definition, function calls, and parameter passing (by value and by reference). This
assignment encourages critical thinking and practical implementation while fostering a
deep understanding of problem-solving with functions.
Assignment Details
Problem Statement
Create a Student Grade Management System that calculates and displays the average grade,
highest grade, lowest grade, and grade distribution (number of students scoring within
specific ranges) for a class of students. Use functions to perform the following tasks:
Requirements
Design Phase
- Create a flowchart or pseudocode to outline the logic of your program.
- Decide whether to use function call by value or function call by reference for each function
and provide a justification.
Implementation Phase
- Write the program in any programming language taught in class (e.g., Python, C++, Java).
Constraints
- Assume a class size of up to 50 students.
- The program should handle invalid inputs gracefully (e.g., prompting the user to re-enter a
valid grade).
Deliverables
- Flowchart or pseudocode for the program design.
- The reasoning behind choosing call by value or call by reference for each function.
- A brief reflection on how functions made the program modular and easier to implement.
Grading Criteria
- Completeness and correctness of the flowchart/pseudocode (20%).
- Calculate Average: Pass grades by reference and return the average by value.
- Find Min/Max: Pass grades by reference to find the highest and lowest grades.
- Grade Distribution: Pass grades by reference and calculate the counts for each grade range.
- Display Results: Use call by value for results to display them without modification.
Learning Outcomes
- Understand how to design programs using modular components (functions).
- Differentiate between call by value and call by reference and apply them effectively.