Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using murach's visual basic 2015 and visual studio need screeshots and code, and exe file Exercise 4-2 Enhance the Invoice Total application This exercise will

using murach's visual basic 2015 and visual studio

need screeshots and code, and exe file

Exercise 4-2 Enhance the Invoice Total application

This exercise will guide you through the process of enhancing the Invoice Total application of exercise 4-1 so it works like the application in figure 4-21. This will give you more practice in developing forms and working with data.

Open the Invoice Total application and enhance the form

1. Open the application in the C:\VB 2015\Chapter 04\InvoiceTotalEnhanced directory.

2. Use the techniques that you learned in chapter 2 to enlarge the form and to add the new controls that are shown in figure 4-21 to the form.

3. Set the properties for each of the controls. You should be able to do this without any guidance, but try to name each control thats going to be referred to by code with the proper prefix followed by the name that identifies it in the form (like txtNumberOfInvoices).

Add the code for the enhancements

4. Switch to the Code Editor and enter the three module-level variables in figure 4-21. These are the variables that will accumulate the data for all the invoices.

5. Enhance the code for the Click event of the Calculate button so it calculates and displays the new data. Try to do this without referring to figure 4-21.

6. Use the techniques you learned in chapter 3 to start the event handler for the Click event of the Clear Totals button. Then, add the code for this event. Here again, try to do this without referring to the code in figure 4-21.

7. Test the application and fix any errors until the application works properly. Be sure that it restarts properly when you click the Clear Totals button and enter another batch of invoices.

Add more controls and code

8. Add three more labels and three more text boxes below the two columns of text boxes and labels on the right side of the form. The three labels should say Largest invoice, Smallest invoice, and Mid point. The text boxes to the right of the labels should display the values for the largest invoice total, the smallest invoice total, and the value thats halfway between these totals.

9. Add the code that makes this work. If youre new to programming, this may challenge you. (Hint: To find the smallest invoice total, use the Math.Min method to compare each invoice total to a variable that contains the smallest invoice total to that point. Then, replace the variable value with the smaller of the two invoice totals. To make this work for the first invoice, you can initialize this variable to a number that will be larger than the largest invoice total, like 9999999.)

10. Test the application and fix any errors until the application works properly. Then, 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

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

Define policy making?

Answered: 1 week ago

Question

Define co-ordination?

Answered: 1 week ago

Question

What are the role of supervisors ?

Answered: 1 week ago