I have to create a program where, by the push of a button, you average as many quiz scores as you want. It has to display the amount of quiz scores you have entered in a fixed3D label and the quiz scores also go in a label. So far, I have been identifying variables, but I really don't know where to start on this project. I assume you have to use the String method, but I don't fully understand it. Theres an example of how to make a Fund Raiser app in my textbook and ive tried following the code on that as much as I can, but it doesnt feel like I'm doing it right. I would love suggestions on how to start it out if anyone is feeling gracious.
Thank you

We can't say whether or not you are doing it right if you don't show us what you have so far. You say you want to find the average of an arbitrary number of scores. Are the numbers to be entered all at once or one at a time?

One at a time through a text box. And I've been Dimming variables and I used Sub CalculateAverage(ByVal quizscore As Decimal, ByRef average As Decimal) and I have also have Val(scoreTextBox.Text) just resting underneath the Sub because I feel like it is the right code I just dont know where to place it. I keep deleting my code if I don't feel like it is right and I don't have much else to say. Just that the button controlls all the operations.

If you start wiith a class level variable to contain the running total, and another to contain the number of scores then you can have a textbox for entering the scores one at a time. Add a button which the user can click after a new score is entered. The button code will increment the number of scores entered and add the new score into the running total. It can also add the new score into a display list and present the running average.

Edited 2 Years Ago by Reverend Jim

This article has been dead for over six months. Start a new discussion instead.