Exercise3
Exercise3
Scenario: We want to manage student information, specifically their names and grades for
three different subjects (Math, Science, English).
Explanation:
• The index of the arrays corresponds to the student. For example, names[0] is the
name of the first student, mathGrades[0] is their Math grade, and so on.
• We have separate loops to print student information and calculate the average
grade.
using System;
Now you’re turn. Let’s turn this program into OOP by following the instructions below:
• We loop through the students array, printing the information and using
the GetAverageGrade() method to calculate and print the average.