Question: Visual Basic Test Score Analysis Overview This project requires building an application that allows a user to enter any number of scores (in the form
Visual Basic
Test Score Analysis
Overview
This project requires building an application that allows a user to enter any number of scores (in the form of floating-point values), and calculate several statistical measures across those scores, including:
The arithmetic mean.
The maximum score.
The minimum score.
The standard deviation of the scores.
The range of the scores.
The number of scores that are above average.
Program Requirements
All scores entered into the program must be validated. In order to do this, the program needs to know the range of point available, from zero to some maximum possible score (MaxScore). To do this, implement the forms load-event handler. It should use an input box to get the MaxScore (i.e. total points available) value from the user. This MaxScore value must be validated, using a separate validation function, as an integer that is greater than zero before being accepted. The value of MaxScore must be stored in a class variable.
The program must use a labeled text box that allows the user to enter scores, one-at-a-time. The scores entered must be stored in a list box.
A button labeled (with something like) Record Score must take the score that the user entered in the text box (above) and enters that value into a list box that is initially empty. This allows the user to enter a list of scores of arbitrary length.
The action performed by the Record Score buttons click-event handler must only allow scores between 0 and MaxScore with a step size of 0.5: {0, 0.5, 1, 1.5, ..., MaxScore}. That is, the value must be tested for validity. This validity testing must be performed using one or more procedures or functions; a scores validity cannot be tested directly within the Record Score buttons click-event handler.
A second button labeled with something like Analyze Scores must perform all of the statistical analyses indicated above. Each statistic must be placed in its own output label that has a border style set to make it show and have a fixed size. The output in these labels must be displayed to three decimal places, except where fewer decimal places can be displayed with no loss of precision.
Each statistic must be calculated using its own function that does the work. Note that these functions must not directly alter the content of any output label. Rather they should generate and return the desired numeric value, which is displayed (with the appropriate formatting) in the appropriate output label by the Analyze Scores buttons click-event handler.
Every type of loop must be used in the calculations performed in the various statistics functions, including: ForNext, DoWhileLoop, Do UntilLoop, DoLoop While, and DoLoop Until.
The statistics functions must implement:
The arithmetic mean of scores is given by:
Algorithm:
Use a loop to:
Accumulate the sum of all scores in the list box.
Count how many scores are present ().
Divide the accumulated sum of the scores by the count of the scores.
The maximum score:
Algorithm:
Initialize a local variable to the value of the first score in the list box.
Use a loop to test all other scores in the list box to see if they are larger than the current maximum score found.
If a score is greater than the current maximum, then remember that score as the new current maximum seen so far.
The minimum score:
Same algorithm as for finding the maximum scorejust replace maximum with minimum in the algorithm.
The standard deviation of scores is given by:
where is the arithmetic mean of . Use the function that calculates the arithmetic mean (from above) in the standard deviation function to calculate .
Standard deviation is a measure of the spread of a set of values about the value of the arithmetic mean of that set.
Algorithm:
Calculate the arithmetic mean.
Use a loop to accumulate the square of the differences between each score and the arithmetic mean of all scores.
Divide by .
Take the square root.
The range of the scores:
The range of a set of values is the difference between the maximum value and the minimum value.
The number of scores that are above the arithmetic mean:
You are on your own here.
A third button labeled with (something like) Clear must clear all content from the input textboxes, output labels, and the list box. Finally, it must leave keyboard focus in the text box for entering new scores.
All buttons must have an access key defined. In addition, the Record Score button must be made the accept button(invoked by the Enter key).
The tab sequence must be this sequence of controls: Score input text box, Record Score button, Analyze Scores button, Clear button.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
