Question: Student Grades. Download the Week 1 0 - Ex 2 OptionA folder from the DataFiles folder in Moodle to your Week 1 0 folder. Unzip

Student Grades. Download the Week10-Ex2OptionA folder from the DataFiles folder in Moodle to your Week10 folder. Unzip the file and open the project in Visual Studio.
The files small_marks.csv and large_marks.csv are provided in the template folder for testing.
You are to write an application which reads information about student exam marks. The file contains the student id number followed by the exam mark in csv format.
Exercise 2
Option A:
80
Introduction to Programming Practicals
Open the files in Wordpad to see the structure of the files. The file small_marks.csv just contains a few lines to make it easier to test your application as you are creating it.
The user should be able to Load a marks file and display the id number and mark for each student in a listbox, graph the marks in a picturebox, and generate a report showing the student id, mark and letter grade for each student.
The application should have buttons or menu items to Load Mark File, Graph Marks, Clear Graph, Generate Report and Exit.
The maximum number of students in a marks file is 100.
a) The code for opening a file and loading the data into the two arrays has been provided. Study the code and make sure you understand how it works.
b) Write the code for the Clear Graph button or menu item which clears the picturebox and the Exit button.
c) Write the code for loading a marks file using your pseudo-code from a). Use the Try/Catch structure to deal with any errors which may occur.
d) Write a method called CalculateBarHeight which is passed a mark and returns the height of the bar for the graph as an integer.
Hint: Bar Height = height of picturebox * mark /100
e) Write the pseudo-code for the Graph marks task which will go through each mark that has been stored in the arrays and draws it's bar on the bar graph. All bars should start at the bottom of the picturebox. See the picture below
81
COMPX101
Introduction to Programming
82
f) Write the code for the Graph Marks button or menu item based on your pseudo-code.
g) Write a method called CalcLetterGrade which is passed a mark out of 100 and returns back the correct letter grade based on the table below:
A 80-100
B 65-79
C 50-64
D 35-49
E 0-34
h) Write the code for the Generate Report button or menu item which will write to a textfile the id, mark and letter grade of each student. The report should have a header for each column and a footer at the end stating the number of students in the report.
i) Document your code appropriately, with comment headers for each method, and add your name and id number as comments at the top of your code.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!