Purchase Solution

Visual Basic - Dental Payment Application

Not what you're looking for?

Ask Custom Question

8.1 1 (Enhanced Dental Payment Application) Modify the Dental Payment application
from this tutorial to include additional services. Add the proper func-
tionality (using If... Then statements) to determine whether any of the new CheckBoxes are
selected, and, if so, add the price of the service to the total bill. Display an error message in a
dialog if the user selects the Other CheckBox but does not specify a price for the service.

a) Copying the template to your working directory. Copy the directory C: Exampl es
Tutori al 08Exerci sesDental PaymentEnhanced to your C: Si mpl yVB2008
directory.

b) Opening the application's template file. Double click Dental PaymentEn-
hanced. sl n in the Dental PaymentEnhanced directory to open the application.

c) Adding CheckBoxes, Labels and a TextBox. Add two CheckBoxes and two Label s to
the Form. The new CheckBoxes should be labeled Fluoride and Root Canal, respec-
tively. Add these CheckBoxes and Label s beneath the X-Ray CheckBox and its price
Label . The price for a fluoride treatment is $50; the price for a root canal is $800.
Add a CheckBox labeled Other and a Label containing a dollar sign ($) to the Form,
as shown in Fig. 8.25. Then add a TextBox to the right of the $ Label in which the
user can enter the cost of the service performed.

d) Modifying the Click event handler code. Add code to the cal cul ateButton_Cl i ck
event handler to determine whether the new CheckBoxes have been selected. This
can be done by modifying the compound condition in the first If... Then statement in
the event handler. Add an El seIf clause to determine if the user selected the Other
CheckBox but did not specify a price? if so, display an error message in a dialog.
Also, use If... Then statements to update the bill amount.

e) Running the application. Select Debug > Start Debugging to run your application.
Test your application by checking one or more of the new services. Click the Calcu-
late Button and verify that the proper total is displayed. Test the application again by
checking some of the services, then checking the Other CheckBox and entering a dol-
lar value for this service. Click the Calculate Button and verify that the proper total
is displayed, and that it includes the price for the "other" service.

f) Closing the application. Close your running application by clicking its close box.

g) Closing the IDE. Close the Visual Basic IDE by clicking its close box.

Purchase this Solution

Solution Summary

The expert dental payment applications. The visual basics are analyzed.

Purchase this Solution


Free BrainMass Quizzes
Javscript Basics

Quiz on basics of javascript programming language.

C# variables and classes

This quiz contains questions about C# classes and variables.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.