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 WeekExOptionA folder from the DataFiles folder in Moodle to your Week folder. Unzip the file and open the project in Visual Studio.
The files smallmarks.csv and largemarks.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
Option A:
Introduction to Programming Practicals
Open the files in Wordpad to see the structure of the files. The file smallmarks.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
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 pseudocode from a Use the TryCatch 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
e Write the pseudocode 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
COMPX
Introduction to Programming
f Write the code for the Graph Marks button or menu item based on your pseudocode.
g Write a method called CalcLetterGrade which is passed a mark out of and returns back the correct letter grade based on the table below:
A
B
C
D
E
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
