Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this exercise, you'll create a score calculator that saves the scores the user enters in an array and calculates the sum of the scores,
In this exercise, you'll create a score calculator that saves the scores the user enters in an array and calculates the sum of the scores, the average of the scores and how many scores have been entered Score Calculator Score: 9 Score total 472 Score count: 5 Average: 94 Display Scores Clear Scores Ect 1. Create a new project named Assignment7_[YOURNAME 2. Design the form that you see above by adding the necessary controls and name them appropriately. When the user presses the Enter key, the Click event of the Add button should fire. When the user presses the Esc key, the Click event of the Exit button should fire 3. Declare a class variable for an array that can hold up to 20 scores and an index variable that you can use to assign scores to elements of the array as well as keep count of how many scores are entered 4. Create an event handler for the Add" button that adds the score the user enters to an element of the array. (Hint: Use the index variable to assign the score to the correct element, be sure to increment the index variable each time the add button is clicked) Clear the input and focus the score textbox on each "Add" click. 5. Create an event handler for the "Clear Scores" button that clears the output textboxes resets the index variable and zeros out all of the elements in the array. (Hint: Use a for- loop to iterate through the array and assign each element a value of 0) 6. Add a Display Scores button that calculates the total and average of the elements in the array. Then display the total, average and count (number of scores entered) in the correct text boxes 7. Write validation methods to ensure that when the add button is clicked, the score is present, it is numeric and that the max number of scores (20) has not be reached
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started