This program will read two text files into parallel arrays. The one text file has student names and the other text file has their final grades for an exam. You will read these files into arrays and then calculate the average grade, the percent of grades above average, the highest grade and the lowest grade. You will also list the top 5 students and their exam score. The program will need to check if any other students have an exam score equal to the fifth students (meaning more than 1 student could have a score equal to the student fifth on the list).

You need to break the program down into sub procedures. You will be passing arrays to the procedures (and any other necessary variables. Remember arrays are naturally passed ByRef.

THE TWO TEXT FILES ARE INCLUDED IN THE ZIP FOLDER WITH THESE DIRECTIONS

You should have a Clear button.

Coding

In the main button code you will need to read the two text files into arrays and remember a text file can only be put into a string array

  • You will need another array declared to copy the string grade array to in order to manipulate the data with array methods (such as Count, Min etc)
    • You can use a For Next Loop to copy the string array with the grades into the numerical array
  • You will then send the Grade numeric array and Student string array to a procedure for manipulation and in this sub procedure you may call another sub procedure (or procedures for output)

In the sub procedure for manipulation you will want to dim any variables needed in the procedure

  • The average grade, percent above average, the highest and lowest grade can be done in a separate procedure
  • I will give you a hint to get the output for the list box of the top 5 student exam scores you will need a loop within a loop, looping through the grade array
    • Remember whatever the max score is at the time in the loop, the parallel array for students will have the matching student name in the same index
  • Another hint is you will need to loop through the array again to check for students who may have the same grade as the fifth student with the highest score

Form

A picture of the form is below. It will be graded based on how other programs were graded (proper naming, formatting, and form opening center screen). I want the four text boxes to be set to Read Only and their Tab Stop set to False and the list box Tab Stop to be set to False. See image.

You can be creative in writing code for this program. I just want to make sure you are using parallel arrays, passing arrays to sub procedures and getting the correct output.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.