Answered step by step
Verified Expert Solution
Link Copied!

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,

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genetic Databases

Authors: Martin J. Bishop

1st Edition

0121016250, 978-0121016258

More Books

Students also viewed these Databases questions

Question

Enhance your words with effective presentation aids

Answered: 1 week ago