Open the VB2015Chap10Average SolutionAverage Solution (Average Solution.sln) file. The application should display a students name and the

Question:

Open the VB2015\Chap10\Average Solution\Average Solution (Average Solution.sln) file. The application should display a student’s name and the average of five test scores entered by the user.

a. Create a structure named StudentInfo. The structure should contain two members: a String variable for the student’s name and a Double array for the test scores. An array contained in a structure cannot be assigned an initial size, so you will need to include an empty set of parentheses after the array name, like this: Public dblScores() As Double.

b. Open the code template for the btnCalc_Click procedure. First, use the StudentInfo structure to declare a structure variable. Next, research the Visual Basic ReDim statement. Use the ReDim statement to declare the array’s size. The array should have five elements.

c. The btnCalc_Click procedure should use the InputBox function to get the student’s name. It should also use a repetition structure and the InputBox function to get the five test scores from the user, storing each in the array. The procedure should display the student’s name and his or her average test score in the lblAverage control. Test the appliation appropriately.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question
Question Posted: