Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

write code in C# . Create the C# program with the name XxxxYyyy where Xxxx is yo

ID: 3869097 • Letter: W

Question

write code in C#.

Create the C# program with the name XxxxYyyy where Xxxx is your first name and Yyyy is your last name (e.g., AndrewSmith). You must use same name for project and solution, use upper and lower cases for the project name and solution name, no spaces. At the beginning of your source code, you must again enter your section #, your name and student ID as a comment.
Zip up your entire program from the top folder and submit it via Blackboard before the due date. Do not rename the folder. You will be responsible for accurately compressing the entire project folder (along with solution files) and submitting it on blackboard. Late submission will not be accepted. The name of your zip file must be the same as your project name. If you do not follow the above instructions, including the file name and subject line, you will get marks deducted.
Note: Sharing your code, and looking at another student’s code will constitute to cheating. In case of cheating both the student that copies and the student that shared or allowed the copying would get Zero and will reported to administration.
Task: In this assignment, you are required to implement a C# application for maintaining a student grade book. Student Records (see given text file) contain Id, First Name, Last Name, Quiz Score (max 50), Midterm Score (max 50), Final Score(max 100). You will be computing the total course grade for each student based on the following allocation: 20% of total course grade for quiz, 30% for midterm, 50% for finals. Based on the total grade, a single character letter grade needs to be given based on Douglas College cut off for letter grades (see figure).
I. Form Design: Design the App with the following design features (see figure for sample). Your form should contain an input and output group box. The input group box contains an input listbox that will display Id, First Name and Last Name (only these fields), and a Load and Process Students Button. The output group box will contain Output Label and a Save Student Grades Button. In addition, there are two more buttons: View Selected Student Grades button, and
Delete Selected Student Grades Button. Finally, choose a background image of your choice and other styling features for your application.
II. Load and Process Students Button: When the Load and Process Student Records button is clicked, student records will be read from a text file using the Open File Dialog control, and only the Id, First and Last name each separated by a tab will be displayed in the input listbox. In addition to displaying the id, first and last name, this event handler should also parse the scores, and compute the total course grade (out of 100) and the corresponding letter grade for each student. Feel free to use methods, structures, arrays or lists as you see fit.
III. View Selected Student Details Button: When this button is clicked, and if no student is selected you should display an error message in the output label. If a student is selected, then retrieve all the fields for that student (id, first name, last name, quiz, midterm, final, total course grade, letter grade), and display each field name along with the value in the output label (in a clear, formatted fashion).
IV. Delete Selected Student Button: When this button is clicked, and if no student is selected you should display an error message in the output label. If a student is selected, then delete this student from the listbox.
V. Save All Student Grades Button: When the user clicks on this button, for those students that are still in the list box, write the id, first name, last name, quiz, midterm, final, total course grade, letter grade onto a text file using the save file dialog box control (giving the user the flexibility to save the file anywhere). The file should have a header row at the top that gives the name of each field. Finally, the output label should display log messages indicating how many student records were written to the file, and the filename location. And then a final message indicating “Save operation complete.”. All these log messages should be displayed in the output label.


Note: Use methods, arrays, lists or structures to complete this task as you see fit

| Student Grades App Input Section Output Section studentListBox Output Label Delete Selected Student View Selected Student Details Load and Compute Student Grades Save All Student Grades

Explanation / Answer

using System;

using System.Collections.Generic;

using System.Text;

namespace Program

{

class Program

{

static void Main(string[] args)

{

int Num1, Num2,Num3,Num4,Num5,Num6,total;

float percentage;

char option;

Console.WriteLine(“Enter the Marks of all subjects: “);

Console.Write(“Enter the Subject1 Marks : “);

Num1 = Convert.ToInt32(Console.ReadLine());

Console.Write(“Enter the Subject2 Marks : “);

Num2 = Convert.ToInt32(Console.ReadLine());

Console.Write(“Enter the Subject3 Marks : “);

Num3 = Convert.ToInt32(Console.ReadLine());

Console.Write(“Enter the Subject4 Marks : “);

Num4 = Convert.ToInt32(Console.ReadLine());

Console.Write(“Enter the Subject5 Marks : “);

Num5 = Convert.ToInt32(Console.ReadLine());

Console.Write(“Enter the Subject6 Marks : “);

Num6 = Convert.ToInt32(Console.ReadLine());

total = Num1 + Num2 + Num3 + Num4 + Num5 + Num6;

percentage = total / 6;

if (percentage > 75)

{

option = ‘1’;

}

else if (percentage > 60)

{

option = ‘2’;

}

else if (percentage > 50)

{

option = ‘3’;

}

else if (percentage >= 35)

{

option = ‘4’;

}

else

{

option = ‘5’;

}

Console.WriteLine(“The RESULT of Student with GRADE :”);

Console.WriteLine(“Subject1 Marks : {0}”, Num1);

Console.WriteLine(“Subject2 Marks : {0}”, Num2);

Console.WriteLine(“Subject3 Marks : {0}”, Num3);

Console.WriteLine(“Subject4 Marks : {0}”, Num4);

Console.WriteLine(“Subject5 Marks : {0}”, Num5);

Console.WriteLine(“Subject6 Marks : {0}”, Num6);

Console.WriteLine(“TOTAL Marks : {0}”, total);

Console.WriteLine(“PERCENTAGE : {0}”, percentage);

switch (option)

{

case ‘1’:

Console.WriteLine(“Grade: First Class with Distinction”);

break;

case ‘2’:

Console.WriteLine(“Grade: First Class”);

break;

case ‘3’:

Console.WriteLine(“Grade: Second Class”);

break;

case ‘4’:

Console.WriteLine(“Grade: Third Class”);

break;

case ‘5’:

Console.WriteLine(“F A I L”);

break;

default:

Console.WriteLine(“Invalid GRADE”);

break;

}

Console.ReadLine();

}

}

}