Print out information for all students


Write a C# program which allows the user to enter student information and outputs the appropriate grade for the student. This assignment involves the use of classes, arrays or collections, loops and methods. 
Result Class: 
Create a class called Result.cs which serves as the main class. This class will first prompt the user for number of student records. You will create an array based on this information. The program reads a list of student names, marks and grades into an array. This is done using a loop and prompting the user to enter the names and marks, one by one. (The student name should not be duplicate).The grade is automatically computed based on the mark provided. The Result class shall include the following options: 
1. Display a Student Mark 
2. Change Student Mark 
3. Print out information for all students
4. Exit program 

Student Class: 
Create a class called Student.cs. This class contains the following: 
a) class data fields name, mark and grade 
b) public Student (string name, double mark, string grade) 
// constructor 

c) public string getName() / / to return name of student 
d) public double getMark() // to return mark of student 
e) public string getGrade() // to return student grade 
f) public void setMark(double mark) // to set student mark 
g) public string setGrade(double mark) // mark is first checked using a nested if-else and switch to determine grade.
The possible grades are: 
0 <= mark < 50 - 
50 <= mark < 60 - 
60 <= mark < 70 - 
70 <= mark < 80 - 
80 <= mark < 100 - 
Sample Output: 
Please enter number of student marks you would like to add: 2 
Please enter name of student 1 : Sam 
Please enter mark for student 1 : 33 
Please enter name of student 2 : John 
Please enter mark for student 2 : 88 
Choose an option: 
1. Display a Student Mark 
2. Change Student Mark 
3. Print out information for all students 
4. Exit program 
Enter Option: 1 
Display a student mark
Please enter name of student you would display mark for: jjj 
I am sorry. Student: 'jjj' does not exist 
Choose an option: 
1. Display a Student Mark 
2. Change Student Mark 
3. Print out information for all students 
4. Exit program 
Enter Option: 1 
Display a student mark 
Please enter name of student you would display mark for: Sam 
Marks for Sam is: 33.0 
Choose an option:
1. Display a Student Mark 
2. Change Student Mark 
3. Print out information for all students 
4. Exit program 
Enter Option: 2 
Change Student Mark 
Please enter name of student you would like to change mark for: John 
Current marks for John is: 88.0 
Enter new mark for John: 3333 
Invalid Entry! Marks must be between 0 - 100!
Enter new mark for John: 70 
New grade for John is: D 
Choose an option: 
1. Display a Student Mark 
2. Change Student Mark 
3. Print out information for all students 
4. Exit program 
Enter Option: 3 
Print out information for all students 
Name Mark Grade 
Sam 33.0 F 
John 70.0 D 
Choose an option: 
1. Display a Student Mark 
2. Change Student Mark 
3. Print out information for all students 
4. Exit program 
Enter Option: 4  

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Print out information for all students
Reference No:- TGS0124595

Expected delivery within 24 Hours