Question
Start a new project named ScoreCalculator in the Extra StartsChapter 04 directory. Add labels, text boxes, and buttons to the default form and set the
Start a new project named ScoreCalculator in the Extra Starts\Chapter 04 directory.
Add labels, text boxes, and buttons to the default form and set the properties of the form and its controls so they appear as shown above. 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.
Declare two class variables to store the score total and the score count.
Create an event handler for the Click event of the Add button. This event handler should get the score the user enters, calculate and display the score total, score count, and average score, and move the focus to the Score text box. It should provide for integer entries, but you can assume that the user will enter valid integer values.
Create an event handler for the Click event of the Clear button. This event handler should set the two class variables to zero, clear the text boxes on the form, and move the focus to the Score text box.
Create an event handler for the Click event of the Exit button that closes the form.
Test the application to be sure it works correctly.
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