Computer Science – 12.2 Program Design | e-Consult
12.2 Program Design (1 questions)
Login to see all questions.
Click on a question to view the answer
Structure Chart:
The top-level module is 'Grade Processor'. It orchestrates the grade processing tasks.
Level 1:
- Grade Processor: The main module.
- Grade Analysis: Performs calculations and identifies passing grades.
- Report Generation: Creates the summary report.
Level 2:
- Grade Analysis:
- Calculate Average Grade: Takes a list of grades as input. Parameters: grades (a list of floats). Returns: average_grade (a float).
- Identify Passing Students: Takes a list of grades and the passing grade threshold as input. Parameters: grades (a list of floats), passinggrade (a float). Returns: passingstudents (a list of student names who have passed).
- Report Generation:
- Format Report: Takes the average grade and list of passing students as input. Parameters: averagegrade (a float), passingstudents (a list of student names). Returns: report_string (a string).
- Output Report: Takes the formatted report string as input. Parameters: report_string (a string). Returns: None.
Relationships:
| Grade Processor calls Grade Analysis and Report Generation. |
| Grade Analysis calls Calculate Average Grade and Identify Passing Students. |
| Report Generation calls Format Report and Output Report. |