Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using the Murach's Visual Basic 2015 book and visual Studio ( I need a snapshot of work along with the code and how to save

using the Murach's Visual Basic 2015 book and visual Studio

( I need a snapshot of work along with the code and how to save as a exe file)

Exercise 7-2 Enhance the Invoice Total application

If you did exercise 6-1 in the last chapter, this exercise asks you to add data validation and exception handling to it.

1. Copy the Invoice Total application from your C:\VB 2015\Chapter 06 directory to your Chapter 07 directory. This should be your solution to exercise 6-1 of the last chapter.

2. If your application has both a Sub procedure and a Function procedure for setting the discount percent, delete the Sub procedure.

3. Go to the Sub procedure for setting the discount percent and comment out the Else clause. That means that a discount percent is only set for customer type codes of R and C, so assume that these are the only valid customer type codes.

4. Add data validation for the customer type entry so it has to be either R or C. To do that, write a Function procedure named IsValidCustomerType that validates the entry, displays an error message if the entry is invalid, and returns a Boolean value that indicates whether the type is valid.

5. Call the IsValidCustomerType function at the start of the btnCalculate_Click procedure, and exit from the procedure if the customer type is invalid. Then, test this change

6. Add data validation for the subtotal entry so it has to be a positive numeric value that is greater than zero and not greater than 1000. To do that, write a Function procedure named IsValidSubtotal that validates the entry, display an appropriate error message if the entry is invalid, and returns a Boolean value that indicates whether the entry is valid. this should illustrate the value of generic procedures like the ones you used in the Future Value application.

7. Call the IsValidSubtotal function at the start of the btnCalculate_Click procedure, and exit from the procedure if the subtotal is invalid. Then, test this change.

8. Modify the application so T is a valid customer type that gets a standard 40% discount. Then, test this change. This illustrates how the use of Function procedures can make applications easier to modify.

9. When you're through experimenting, close the project.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

More Books

Students also viewed these Databases questions

Question

Evaluate each expression. 3 2 -3

Answered: 1 week ago

Question

Identify several ways to make better decisions about retirement.

Answered: 1 week ago

Question

When should you avoid using exhaust brake select all that apply

Answered: 1 week ago

Question

Describe new developments in the design of pay structures. page 475

Answered: 1 week ago