For this exercise you will modify existing code from ICE3. The code changes will include a new procedure and function.

1. In D2L, download the project called ICE5 and unzip it to a location on your computer.

2. When the form first loads it will look like the following: see image.

3. Procedure InvalidInput Requirements:

a. Create a new procedure that is used when the user has entered invalid data into the textbox (Hint: Look at the btnCalculate_Click procedure to see how the procedure is being called.)

b. The procedure should have one parameter that is defined as ByVal

c. Use an IfThenElseIfEnd If statement to determine which textbox to process

d. Within a WithEnd With statement block

i. Set the focus to the appropriate textbox

ii. Select the text within the appropriate textbox

4. Function CalculateSalesTax Requirements:

a. Create a new function to calculate the sales tax amount (Hint: Look at the btnCalculate_Click procedure to see how the function is being called.)

b. The function should have one parameter that is defined as ByVal

c. The function should return a Decimal value

d. Make sure to use the decTAX_RATE constant variable in the calculation

5. Other Requirements:

a. In the code update the following comment lines above the Public Class frmMain line

i. Programmer: < Your name here>

ii. Date: < Todays date>

b. Run the program, using the sample output below, to validate the sales tax function

c. Follows all our MIS 328 coding standards.

6. Sample Output: see image.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.