BIS 311 DeVry Week 5 iLab
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>BIS</strong> <strong>311</strong> <strong>DeVry</strong> <strong>Week</strong> 5 I Lab<br />
Downloading is very simple, you can download this Course here:<br />
http://mindsblow.us/question_des/<strong>BIS</strong><strong>311</strong><strong>DeVry</strong><strong>Week</strong>5<strong>iLab</strong>/4375<br />
Or<br />
Contact us at:<br />
help@mindblows.us<br />
<strong>BIS</strong> <strong>311</strong> <strong>DeVry</strong> <strong>Week</strong> 5 <strong>iLab</strong><br />
<strong>BIS</strong><strong>311</strong><br />
<strong>BIS</strong> <strong>311</strong> <strong>DeVry</strong> <strong>Week</strong> 5 <strong>iLab</strong><br />
iLAB OVERVIEW<br />
Scenario/Summary<br />
In this lab, you'll implement an application that performs a simple sales tax calculation. The new feature of this<br />
application, compared to what you have done in previous <strong>iLab</strong>s, is that the values entered by the user will be checked<br />
for validity. If the amounts entered are invalid, the application will display appropriate error messages to the user. If the<br />
input data are valid, the application will calculate the sales tax due and the total, including tax.<br />
Sales Tax Application Business Requirements<br />
The user enters an order amount and a sales tax percent. The order amount must be numeric and greater than 0. The<br />
sales tax percent must be numeric, greater than or equal to 0, and less than or equal to 0.14. If the input data are<br />
invalid, appropriate error messages will be displayed to the user. If the input data are valid, the application will calculate<br />
the sales tax by multiplying the order amount by the sales tax percent, and will calculate the order total, including tax,<br />
by adding the order amount and the sales tax. The sales tax and the order total, including tax, will be displayed to the<br />
user.<br />
TOE Chart for Sales Tax Application<br />
Task Object Event<br />
Get the following inputs from the user:<br />
Order amount<br />
Sales tax percent<br />
txtOrderAmount<br />
txtTaxPercent<br />
Perform the following processing: btnCalcTotal Click<br />
Validate inputs<br />
Calculate Tax = Order amount * Sales tax percent<br />
Calculate Order total = Order amount + Tax<br />
Display the following outputs:<br />
Error messages (if input invalid)<br />
lstMessages
Tax (if input valid)<br />
Order total (if input valid)<br />
lstMessages<br />
lstMessages<br />
Pseudocode for Sales Tax Application<br />
Start button-click event handler<br />
Declare numeric variables for<br />
Order amount<br />
Sales tax percent<br />
Tax<br />
Order total<br />
Declare string variables for<br />
Order amount message<br />
Sales tax percent message<br />
Declare Boolean variable for<br />
Inputs valid (initialize to True)<br />
Clear messages<br />
Call ValidateOrderAmount function with Order amount, returning Order amount message<br />
If Order amount message is not empty (i.e. there was an error)<br />
Display Order amount message<br />
Set Inputs valid to False<br />
End If<br />
Call ValidateSalesTaxPercent function with Sales tax percent, returning Sales tax percent message<br />
If Sales tax percent message is not empty (i.e. there was an error)<br />
Display Sales tax percent message<br />
Set Inputs valid to False<br />
End If<br />
If Inputs valid is True<br />
Get Order amount<br />
Get Sales tax percent<br />
Calculate Tax = Order amount * Sales tax percent<br />
Calculate Order total = Order amount + Tax<br />
Display Tax<br />
Display Order amount<br />
End If<br />
Stop button-click event handler<br />
Start ValidateOrderAmount function (Order amount)
If Order amount is not numeric<br />
Set Order amount message to "Please enter a numeric order amount."<br />
Else If Order amount is less than or equal to zero<br />
Set Order amount message to "Please enter an order amount greater than zero."<br />
Else<br />
Set Order amount message to the empty string (no error)<br />
End If<br />
Return Order amount message<br />
Stop ValidateOrderAmount<br />
Start ValidateSalesTaxPercent (Sales tax percent)<br />
If Sales tax percent is not numeric<br />
Set Sales tax percent message to "Please enter a numeric sales tax percent."<br />
Else If Sales tax percent is less than zero or greater than 0.14<br />
Set Sales tax percent message to "Please enter a sales tax percent between 0.00 and 0.14."<br />
Else<br />
Set Sales tax percent message to the empty string(no error)<br />
End If<br />
Return Sales tax percent message<br />
Stop ValidateSalesTaxPercent<br />
Deliverables<br />
<br />
<br />
<br />
<br />
<br />
Submit a Word document named Lab5YourFirstLastName.docx (where YourFirstLastName = your first and<br />
last name; e.g., Lab5JohnSmith.docx) containing the following:<br />
Screenshot of form showing the application running, with non-numeric entries for Order amount and Sales tax<br />
percent, and appropriate error messages displayed.<br />
Screenshot of form showing the application running, with out-of-range entries for Order amount and Sales tax<br />
percent, and appropriate error messages displayed.<br />
Screenshot of form showing the application running, with valid entries for Order amount and Sales tax percent,<br />
and correct Tax and Order total results displayed.<br />
Copy of code for button-click event, ValidateOrderAmount function, and ValidateSalesTaxPercent function.<br />
Category Points % Description<br />
Create and rename form 5 10%<br />
Add controls to form 5 10%<br />
Set properties for controls 5 10%<br />
Code button-click event 5 10%<br />
Windows form was created and renamed SalesTax.vb. Form text<br />
property was set toLab 5 Your Name (where Your Name = your<br />
full name).<br />
The following controls were added to the form: Identifying labels<br />
and text boxes for entry of order amount and sales tax percent;<br />
button to calculate total including tax; and list box for display of<br />
error messages and results.<br />
Name and text properties of all controls were set appropriately,<br />
with no typos or spelling errors.<br />
Button-click event code was entered that corresponds to the<br />
given pseudocode, with no syntax errors.
Code<br />
function<br />
ValidateOrderAmount<br />
5 10%<br />
Function code was entered that corresponds to the given<br />
pseudocode, with no syntax errors.<br />
Code ValidateSalesTaxPercent<br />
5 10%<br />
function<br />
Function code was entered that corresponds to the given<br />
pseudocode, with no syntax errors.<br />
Application is shown running successfully with screen shots for<br />
each of the three test cases:<br />
Test-run application successfully 20 40%<br />
(1) non-numeric entries for order amount and sales tax percent,<br />
with appropriate error messages;<br />
(2) out-of-range entries for order amount and sales tax percent,<br />
with appropriate error messages; and<br />
(3) valid entries for order amount and sales tax percent, with<br />
correct tax and order total results.<br />
Total 50 100%<br />
Required Software<br />
Visual Studio 2012<br />
Access the software at.devry.edu/">https://lab.devry.edu.<br />
Steps: all<br />
iLAB STEPS<br />
Step 1: Launch Visual Studio and Create Project<br />
.equella.ecollege.com/file/dd98a67d-9ec9-4df4-8603-220cf23d1074/30/<strong>BIS</strong><strong>311</strong>_W5_<strong>iLab</strong>.html#top">Back to Top<br />
(a) Log into the Citrix <strong>iLab</strong> site as you did in the previous labs. Click the Microsoft Visual Studio 2012 icon to launch<br />
Visual Studio.<br />
(b) Pull down the File menu and select New Project . . .<br />
(c) In the New Project dialog, ensure that under Templates in the left column, Visual Basic is selected, and that in the<br />
center column, Windows Form Application is selected. In the Name field at the bottom of the dialog, enter SalesTax.<br />
Click OK.<br />
Step 2: Rename Form and Add Controls<br />
.equella.ecollege.com/file/dd98a67d-9ec9-4df4-8603-220cf23d1074/30/<strong>BIS</strong><strong>311</strong>_W5_<strong>iLab</strong>.html#top">Back to Top<br />
(a) In the Solution Explorer pane on the right side of the screen, right-click on Form1.vb, select Rename, and change<br />
the name to SalesTax.vb. Press Enter after entering the new form name.<br />
(b) Change the Text property of the form to Lab 5 Your Name (where Your Name = your full name), as you have done<br />
in previous labs.<br />
(c) Drag the following controls from the ToolBox onto the form, arrange them in a logical fashion, and set their properties<br />
as indicated in the table below.<br />
Control Name Property Text Property<br />
Label Label1 Order amount:<br />
TextBox<br />
txtOrderAmount<br />
Label Label2 Sales tax percent:<br />
TextBox<br />
txtSalesTaxPercent
Button btnCalcTotal Calculate Total Including Tax<br />
ListBox<br />
lstMessages<br />
(d) Ensure that all controls are positioned and sized so that the form has a neat, professional appearance and none of<br />
the text is cut off. Your completed form should look similar to the following.<br />
(e) Pull down the File menu and select Save All to save your work. If a Save Project dialog appears, ensure that the<br />
project is saved to the My DocumentsVisual Studio 2012Projects folder under your DSI number. Click Save.<br />
Step 4: Test, Debug, and Submit<br />
.equella.ecollege.com/file/dd98a67d-9ec9-4df4-8603-220cf23d1074/30/<strong>BIS</strong><strong>311</strong>_W5_<strong>iLab</strong>.html#top">Back to Top<br />
(a) Run the application by doing one of the following: click the Start button; pull down the Debug menu, and select Start<br />
Debugging; or press the F5 key.<br />
(b) Your form should appear. Test your application by using the following test cases. For each test case, enter the<br />
indicated values for Order amount and Sales tax percent; click the Calculate Total Including Tax button; and check that<br />
the messages displayed in the list box are correct. Capture a screenshot showing the results of each correct test case<br />
and paste it into a Word document. Remember to use CTRL+ALT+PrintScreen to capture a screenshot.<br />
Test case<br />
Order amount Sales tax percent Messages<br />
#<br />
1 abc def<br />
2 -1 0.15<br />
3 100.00 0.10<br />
Please enter a numeric order amount.<br />
Please enter a numeric sales tax percent.<br />
Please enter an order amount greater than 0.<br />
Please enter a sales tax percent between 0 and 0.14.<br />
The sales tax is $10.00.<br />
The total including tax is $110.00.<br />
As an example, the screenshot for Test Case 1 should look as follows.<br />
(c) If your application does not work correctly, debug the application and try again. Post in the Q & A Forum or contact<br />
your professor for assistance, if needed.<br />
(d) When your application works correctly for all test cases, select and copy all the code for the button-click event<br />
handler, the ValidateOrderAmount function, and the ValidateSalesTaxPercent function, and paste it into your Word<br />
document below the three test case screenshots. Save the Word document as Lab5YourFirstLastName.docx (where<br />
YourFirstLastName = your first and last name; e.g., JohnSmith) and submit it to the appropriate dropbox.