Commission

Problem 1: Chapter 3, Lesson B; page 174; Exercise 4: the Commission Solution.

Open the Commission Solution (Commission Solution.sln) file contained in the

VB2010\Chap03\Commission Solution folder. If necessary, open the designer window. The

application calculates and displays a salesperson’s commission, using a commission rate of

10%. Make the Calculate Commission button the default button. Open the Code Editor window

and review the code in the Calculate Commission button’s Click event procedure. Modify the

procedure’s code to use variables. (Do not use the Val function.) Use a named constant for the

commission rate. Be sure to enter the Option Explicit On, Option Strict On, and Option Infer Off

statements in the General Declarations section. Use the ToString method to display the

commission amount with a dollar sign, two decimal places, and a thousands separator (if

necessary). Save the solution and then start the application. Test the application by calculating

the commission for sales of 7500. The commission should be $750.00.

×
New Download