Answered You can hire a professional tutor to get the answer.

QUESTION

Exercise 6-1 Enhance the Invoice Total application In this exercise, you'll enhance the Invoice Total application of Chapter 5 by adding a procedure...

Exercise 6-1 Enhance the Invoice Total application

In this exercise, you'll enhance the Invoice Total application of Chapter 5 by adding a procedure that determines the discount percent to it. You'll also add another event handler to the application.

  1. open the application that's in the C:VB 2012Chapter 06InvoiceTotal directory.
  2. Start a Sub procedure with three parameters (customer type, subtotal, and discount percent) that will set the discount percent based on the customer type and subtotal. Then, copy the code for doing that from the event handler of the btnCalculate_Click procedure to the new Sub procedure, and modify this code so it works correctly.
  3. Modify the code in the btnCalculate_Click procedure so it calls the Sub procedure to get the discount percent. As you enter the call, notice how the IntelliSense feature helps you enter the arguments. Then, test these changes to make sure they work.
  4. Add a Function procedure with two parameters (customer type and subtotal) that returns the discount percent. Then, modify the calling statement and any other code in the btnCalculate_Click procedure so it uses the Function procedure to get the discount percent. Now, test this change.
  5. Add one event handler named ClearAllBoxes that handles the TextChanged event for both the Customer Type and Subtotal text boxes. This event handler should clear the values in the text boxes that display the results. After you test this change, close this project.
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question