Answer Assignment 02 PDF
Answer Assignment 02 PDF
NET
2.
Sales Tax Calculation Create a simple application to calculate the sales tax for a
purchase. It will use a constant in order to indicate the sales tax percentage. Perform the
following steps Create Form:
Step 4: Right-click on Form1.vb in the Solution Explorer and rename the form to
frmSalesTax.vb.
Step 5: Change the Font Size property to 14 and the Font Bold to True.
Step 4: Change the Font Size property to 14 and the Font Bold property to True. Add
Sales Tax Label :
Step 4: Change the Font Size property to 14 and the Font Bold property to True.
Step 4: Change the Font Size property to 14 and the Font Bold property to True.
Step 6: Calculate the decFinalPrice by adding the amount stored in the decPurchasePrice
and decSalesTaxAmount.
Step 4: Convert the value stored in the txtPurchasePrice text box to a numerical value
and store it in the decPurchasePrice variable.
Step 6: Calculate the decFinalPrice by adding the amount stored in the decPurchasePrice
and decSalesTaxAmount.
Drill 3.11
What is the output if the btnOperators’ Click event is executed?
Drill 3.12
What is the output if the btnOperators’ Click event is executed?
Drill 3.14
What is the output if the btnOperators’ Click event is executed?
Step 2: Start running the application in the normal manner by clicking on the Start
button or hitting the key. Step 3: Enter a value for the purchase price, 49.95. Do not
enter the dollar sign.
PROBLEM DISCUSSION
It will require creating a form with a txtStockAmount text box to store the amount of a
product a company has in stock, a lblAmount label with the Text property set to
“Amount in Stock”, another label, lblInStock, to hold a message, and a button with the
Text property set to “Calculate”. The code of the program compares the number entered
by the user to 0. The Visual Basic .NET Coach
PROBLEM SOLUTION:
Create Project and Form:
Step 1: From the Start window, click on New Project. The New Project window will
appear.
Step 2: Specify the name of the application as InStock.
Step 3: Specify the location as "C:\VB Net Coach\Chapter 4\Code\ ".
Step 4: Click on the OK button.
Step 5: Rename the form to frmInStock.
Step 6: Rename the file by right-clicking on the file name in the Solution Explorer and
setting the name to frmInStock.vb.
Step 7: Set the Text property of the form to In Stock. The Visual Basic .NET Coach.