using System; using System.Collections.Generic; using System.linq; using System.Text; namespacve CalculateStudentAvg { public class Student { public string studentName; public int gradePointAverage; public int studentAverage; public void CalculateStudentAverage(int grade1, int grade2, int grade3, int grade4, int grade5) { gradePointAverage = (grade1 + grade2 + grade3 + grade4 + grade5) / 5; } public void ReturnStudentInfo() { Console.WriteLine("Student Name: " + studentName); Console.WriteLine("GPA: " + gradePontAverage); if (gradePointAverage > 90) { Console.WriteLine("Great Work!"); } else if (gradePointAverage > 85) { Console.WriteLine("Good Work."); } else if (gradePointAverage > 75) { Console.WriteLine("Average Work."); } else if (gradePointAverage > 65) { Console.WriteLine("Marginal Work."); } else { Console.WriteLine("Failing."); } Console.WriteLine(); } } class Program { static void Main(string[] args) { int numberOfStudents; int testScore1; int testScore2; int testScore3; int testScore4; int testScore5; Console.WriteLine("How many students are in the class?"); numberOfStudents = Convert.ToInt32(Console.ReadLine()); Student[] students = new Student[numberOfStudents]' for (int i = 0; i < numberOfStudents; i++) { students[i] = new Student(); } for (int i = 0; i < numberOfStudents; i++) { Console.WriteLine("Enter Student Name: "); students[i].studentName = Console.ReadLine(); Console.WriteLine("Enter Test Score #1: "); testScore1 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Enter Test Score #2: "); testScore2 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Enter Test Score #3: "); testScore3 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Enter Test Score #4: "); testScore4 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Enter Test Score #5: "); testScore5 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine(); students[i].CalculateStudentAverage(testScore1, testScore2, testScore3, testScore4, testScore5); } for (int i = 0; i < numberOfStudents; i++) { students[i].ReturnStudentInfo(); } Console.Write("Press Enter To TerminateÉ"); Console.Read(); } } }