Question: C# Create a class to represent a student and track their grades. Instructions: Define a Student class: The class should have the following private fields:
C# Create a class to represent a student and track their grades.
Instructions:
Define a Student class:
The class should have the following private fields:
string Name
List Grades
Create a constructor that takes the name as a parameter and initializes the Grades list as an empty list.
Add a method AddGradedouble grade to add a grade to the Grades list.
Add a method CalculateAverage that returns the average of the grades.
Add a method PrintStudentInfo that prints the student's name and average grade:
"Student: Name Average Grade: AverageGrade
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
