Using C#, Write a program to perform student record management. It contains two parts: Student
class (from A2) and main program. It should get the student information from the user and set up
student record class array with proper size. The program will perform sorting student record by
last name then first name, compute final grade, search highest final grade student, and then display
this student's information by using ToString() method.
Part I: Student class from A2
Student class definitions:
It should contain last name, first name, 3 exams grade, 5 labs grade, final grade. Its member functions
are default constructor, 2 copy constructors, display student's information and override ToString().
which only display class type, last name, first name, and final grade.
(Note: 3 exam grades and 5 lab grades are stored in an array with 8 elements)
Student class implementation:
The Student class attributes: It should have basic accessor methods (get and set), final grade attributes
should be an read only attribute in the Student class.
Default constructor: It sets student class variables to default value. String variables set to "None",
double variable set to 0, and all elements in the array set to 0.
2 Copy constructors: It sets student class variables in student information by different number of passes
in parameter list.
ComputeGrade() method: It is based on the % of final grade to compute final grade as follows:
Lab's grade is 50% of final grade
Exam 1 and exam 2 are 15% of final grade.
Exam 3 is 20% of final grade.
Note: final grade should display 2 digits after decimal.
Display AllGrade() method: It should return string as student's information in following sequence with
proper format: Last name, First name, Exam 1, Exam 2, Exam 3, Lab 1, Lab 2, Lab 3, Lab 4,
Lab 5, Final Grade (Note: it should not display title in the method)
Override ToString() method: It should use GetType() to return string as student's information in
following sequence with proper format: GetType(), Last Name, First Name, Final Grade
Override CompareTo() method in ICompable library: It will provide the implementation of
CopmareTo() method for the Student class.
Part II: main program:
The main program begins with ask the user how many students record first, then enter each
student's information to set up student record array. Compute all of student's final grade in the
student record array. Then, call sort method to sort the student record array by last name then first
name. Next, display all students list information using Student class DisplayAllGrade() method.
Final action search highest final grade student in the student record array and use Student class
ToString() method to display highest grade student's information.
Three methods:
1. Write "ReadData" method implementation to read the data from the user and store into
student record array
2. Program need to sort the student record array by last name and first name, and it needs to
use the Array.sort() method, which needs to modify the Student class for inherited
IComparable library to provide compare the Student class implementation.)
3. Write "SearchHighestGrade()" method implementation to search and return the index of
array that has highest final grade student.
Output Example:
LastName, FirstName examl exam2 exam3 labl lab2 lab3 lab4 lab5 final
Anderson, Baily
67 89 75 92 83 78 68 67 77.2
Thomas, Daily 99 88
77 66 55 44 33 22 65.45
Thomas, Eason 67 87 79
90 56 75 89 88 78.7
Woo, Alice 88 77 66
55
87 96 81 74.25
44
The highest grade in IST311,Students is Thomas, Eason's final grade 78.7.
Note:
1. This program is prohibited to use Generic Collection library data type and template data
type!