Problem

Open the Debug Solution (Debug Solution.sln) file contained in the VB2012\Chap04\Debug S...

Open the Debug Solution (Debug Solution.sln) file contained in the VB2012\Chap04\Debug Solution folder. Open the Code Editor window and review the existing code. The btnCalc control’s Click event procedure should calculate a 5% commission when the code entered by the user is 1, 2, or 3 and, at the same time, the sales amount is greater than $5,000; otherwise, the commission rate is 3%. Also, the CancelKeys procedure should allow the two text boxes to accept only numbers, the period, and the Backspace key.

a. Start the application. Type the number 1 in the Code box and then press the Backspace key. Notice that the Backspace key is not working correctly. Stop the application and then make the appropriate change to the CancelKeys procedure.

b. Save the solution and then start the application. Type the number 12 in the Code box and then press the Backspace key to delete the 2. The Code box now contains the number 1.

c. Type 2000 in the Sales amount box and then click the Calculate button. A message box appears and indicates that the commission amount is $100.00 (5% of $2,000), which is incorrect; it should be $60.00 (3% of $2,000). Close the message box. Stop the application and then make the appropriate change to the btnCalc control’s Click event procedure.

d. Save the solution and then start the application. Type the number 1 in the Code box. Type 2000 in the Sales amount box and then click the Calculate button. The message box should indicate that the commission amount is $60.00. Close the message box.

e. Test the application using the following codes and sales amounts:

f. When you are finished testing the application, close the Code Editor window and then close the solution.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 4.LC
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT