BIS 311 DeVry All Week I Lab

Downloading is very simple, you can download this Course here:

http://wiseamerican.us/product/bis-311-devry-week-ilab/

Or

Contact us at:

SUPPORT@WISEAMERICAN.US

BIS 311 DeVry All Week I Lab

BIS311

BIS 311 DeVry Week 1 I Lab

I LAB OVERVIEW

Scenario/Summary

In this iLab, you will create a Visual Basic application that meets the following business requirements.

Name Combiner Business Requirements

The application will allow the user to input a person’s first name and last name. When the user clicks the Display Name button, the application will combine the first name, a space, and the last name into the person’s full name, and then display the full name to the user.

The tasks, objects, events (TOE) chart for this application will be as follows.

Task Object Event
Get the following inputs from the user:    
First name txtFirstName  
Last name txtLastName  
Perform the following processing:    
Form full name by combining first name, a space, and last name btnDisplay Click
Display the following output to the user:    
Full name lblFullName  

 

Deliverables

Submit a single Word document named Lab1YourFirstLastName.docx (where YourFirstLastName = your first and last name; e.g., JohnSmith) containing the following.

Screenshot of Windows form showing successful operation of the application

Copy of the application’s button-click event code

Category Points % Description
Create form, rename it, and set its text property 7 14% The form is named NameCombiner.vb and has text property set to Lab1 – Your Name where Your Name = your full name (e.g., John Smith).
Add label and text box for first name, setting name, and text properties for each 7 14% The label text property is set to First name:. Text box is named txtFirstName and has text property set to nothing.
Add label and text box for last name, setting name, and text properties for each 7 14% The label text property is set to Last name:. The text box is named txtLastName and has text property set to nothing.
Add labels for full name, setting name, and text properties for each 7 14% The first label text property is set to Full name:. The second label is named lblFullName and has text property set to ———-.
Add command button and set its name and text properties 7 14% The command button is named btnDisplay and has text property set to Display Name.
Code button-click event 7 14% The code in the button-click event declares two String variables for first, last, and full names; gets the values entered in the text boxes by the user into the corresponding variables; concatenates the first name, a space, and the last name, storing the result in the full name variable; and displays the full name in the appropriate label.
Program tested and runs as required 8 16% A screenshot displays the form after the user has entered a first name and a last name and clicked the Display Name button. The corresponding first name, space, and last name are displayed in the output label.
Total 50   100%

 

Required Software

Visual Studio 2012

Access the software at.devry.edu”>https://lab.devry.edu.

Steps: all

iLAB STEPS

STEP 1: Launch and Configure Microsoft Visual Studio 2012

.equella.ecollege.com/file/8fe38950-b7ec-4492-8803-a1c7312a7eb1/67/BIS311_W1_iLab.html#top”>Back to Top

(a) On the Citrix iLab main screen, if the Visual Studio 2012 icon is not already displayed, click the plus sign (+) on the left side of the screen. Next, click on All Apps and scroll down to find Microsoft Visual Studio 2012. Click on it to add it to your Citrix iLab menu screen.

(b) On the Citrix iLab main menu screen, click the Microsoft Visual Studio 2012 icon to launch the applicatio

STEP 2: Create the Project

.equella.ecollege.com/file/8fe38950-b7ec-4492-8803-a1c7312a7eb1/67/BIS311_W1_iLab.html#top”>Back to Top

(a) Pull down the File menu and select New Project.

(b) In the New Project dialog box, ensure that the Visual Basic and Windows Form Application choices are selected. Change the name in the Name box at the bottom of the dialog box to NameCombiner. Click OK.

(c) A blank form for your application should now be displayed as shown below.

STEP 3: Set Up Main Form

.equella.ecollege.com/file/8fe38950-b7ec-4492-8803-a1c7312a7eb1/67/BIS311_W1_iLab.html#top”>Back to Top

(a) Under Solution Explorer on the right side, right-click on Form1.vb and select Rename. Change the name to NameCombiner.vb and press Enter. The result should look like the following.

(b) If the Properties window is not already displayed below the Solution Explorer window at the bottom right of the screen, click the Wrench icon on the Solution Explorer toolbar to display it.

(c) Click the blank form in the NameCombiner.vb [Design] tab on the left side of the screen to select it. The form’s properties should now be displayed in the Properties window at the bottom right. Scroll through the list to find the Text property row. Change the property for the text from Form1 to Lab1 – Your Name where Your Name = your first and last names (e.g., John Smith).

STEP 4: Add Form Controls

.equella.ecollege.com/file/8fe38950-b7ec-4492-8803-a1c7312a7eb1/67/BIS311_W1_iLab.html#top”>Back to Top

(a) If the Toolbox pane is not opened on the left side of the screen, click the Toolbox tab at the center left edge of the screen to open it. Click the Pushpin symbol at the right side of the Toolbox title bar to pin the Toolbox in the open position.

(b) Click the Common Controls heading in the Toolbox to expand it. Under Common Controls, select the Label control and drag it onto the form, positioning it in the upper left area. In the Properties window, select the Text property of the label and change it to First name:. Press Enter and you should see the new text appear in the label.

(c) Drag a TextBox control from the Common Controls area of the Toolbox and position it directly underneath the First name: label. Note: You may have to scroll down in the list of controls to find the TextBox control. Next, in the Properties window, change the (Name) property to txtFirstName. Ensure that the Text property is empty (blank).

(d) Drag another Label control from the Toolbox and position it in the upper right area of the form. Change its Text property to Last name:.

(e) Drag another TextBox control from the Toolbox and position it directly underneath the Last name: label. Change its (Name) property to txtLastName and ensure that its Text property is empty (blank).

(f) Drag another Label control from the Toolbox and position it in the center of the form below the text boxes. Change its Text property to Full name:.

(g) Drag another Label control from the Toolbox and position it directly underneath the Full name: label. Change its (Name) property to lblFullName and its Text property to ———- (10 dashes).

(h) Drag a Button control from the Toolbox and position it in the center of the form near the bottom. Change its (Name) property to btnDisplay and its Text property to Display Name. If necessary, click and drag the sizing handles (small circles) at the edges of the button to make it larger so that the complete text can be seen in the button.

(i) Verify that your form looks similar to the following, and make any necessary adjustments to the positions and properties of the controls.

STEP 5: Code Button-Click Event

.equella.ecollege.com/file/8fe38950-b7ec-4492-8803-a1c7312a7eb1/67/BIS311_W1_iLab.html#top”>Back to Top

(a) Double-click the Display Name button on the form. This will open the code editor with a stub or template for the button-click event handler procedure already generated for you by Visual Studio.

(b) Starting where the cursor is positioned, in between the line beginning Private Sub btnDisplay_Click( . . . and the line End Sub, enter the following code.

Code for Button-Click Event

‘Display full name

Dim strFirstName As String

Dim strLastName As String

Dim strFullName As String

strFirstName = txtFirstName.Text

strLastName = txtLastName.Text

strFullName = strFirstName + ” ” + strLastName

lblFullName.Text = strFullName

After you have entered your code, the code editor window should look as follows.

(c) Pull down the File menu and select Save All to save your changes to the project. If a Save Project dialog appears, ensure that the project is being saved to the My DocumentsVisual Studio 2012Projects folder under your DSI number. Click Save.

STEP 6: Test, Debug, and Submit

.equella.ecollege.com/file/8fe38950-b7ec-4492-8803-a1c7312a7eb1/67/BIS311_W1_iLab.html#top”>Back to Top

(a) Run the application by doing one of the following: click the Start button (green, right-pointing, triangle icon) on the toolbar; pull down the Debug menu and select Start Debugging; or press the F5 key.

(b) Your form should appear. Enter your first name in the First name text box and your last name in the Last name text box. Then click the Display Name button. Your first and last name should appear under Full name with a space between them, as shown below.

(c) If you received an error message or your application did not work correctly, don’t despair; debugging is a natural part of the programming process. Review your code and the naming of your controls carefully, and find and correct the errors. Then try running the application again. If you get stuck, you can post in the Q & A Forum or contact your professor for assistance.

(d) When your application runs and works correctly, capture a screenshot of the form with your first and last name entries and correct full name displayed. Note: To capture a screenshot of the current window, press the Ctrl, Alt, and PrintScreen keys simultaneously; this will copy an image of the current window into your copy-and-paste buffer. Next, open a Word document and paste your image into the document. Close the application form by clicking the X in the upper right corner. Now select and copy your Visual Basic code for the button-click event in the code editor, and paste this into the Word document as well. Save the Word document as Lab1YourFirstLastName.docx (where YourFirstLastName = your first and last name, e.g., JohnSmith) and submit it to the appropriate Dropbox.

 

BIS 311 DeVry Week 2 iLab

iLAB OVERVIEW

Scenario/Summary

In this iLab assignment, you will create a Visual Basic application that implements a loan payment calculator, based on the business requirements, TOE chart, and pseudocode shown below.

Payment Calculator Business Requirements

The application will accept as inputs a loan amount, an annual interest rate, and the number of years for the loan. The application will calculate the monthly payment amount for the loan. As output, the application will display to the user the monthly payment amount formatted as currency with a dollar sign and cents.

Payment Calculator TOE Chart

Task Object Event
Get the following inputs from the user.    
Loan amount txtLoanAmount  
Annual interest rate txtAnnualRate  
Number of years txtYears  
Perform the following processing.    
Calculate the monthly payment using the Pmt function btnCalcPayment Click
Display the following output to the user.    
Monthly payment formatted as currency with $ and cents lblMonthlyPayment  

 

Pseudocode for Payment Calculator Application

Start

Declare numeric variables for

Loan amount

Annual rate

Years of loan

Monthly payment

Get inputs:

Loan amount

Annual rate

Years of loan

Calculate Monthly payment =-PMT(Annual rate /12,Years of loan *12,Loan amount)

Display Monthly payment formatted as currency with $ and cents

Stop

Deliverables

Submit a Word document named Lab2YourFirstLastName.docx(where YourFirstLastName = your first and last name; e.g., Lab2JohnSmith.docx) containing the following.

Screenshot of the form showing the application running, with correct input and output values displayed in the form

Copy of button-click event code

Category Points % Description
Create and rename form 10 20% A Windows form was created and named PaymentCalculator.vb. The form text property was set to Lab 2 Your Name (where Your Name = your full name).
Add controls to form 10 20% The following controls were added to the form: identifying labels and text boxes for entry of loan amount, annual rate, and years of loan; Calculate Payment button; and label for display of payment amount. Controls are arranged on the form in a logical and visually pleasing layout.
Set properties (name and text) for controls 10 20% Name and text properties of all controls were set appropriately, with no typos or spelling errors.
Code button-click event 10 20% Button-click event code was entered that corresponds to the given pseudocode, with no syntax errors.
Test-run application successfully 10 20% The application is shown running successfully with no errors, with valid inputs and correct output displayed in the form.
Total 50 100%  

 

Required Software

Microsoft Visual Studio 2012

Access the software at.devry.edu”>https://lab.devry.edu.

iLAB STEPS

STEP 1: Launch Visual Studio

.equella.ecollege.com/file/bfe9e5e5-c91c-450f-a8b4-b45a9d02faa3/40/BIS311_W2_iLab.html#top”>Back to Top

Log in to the Citrix iLab site as you did in the previous week’s iLab. The Microsoft Visual Studio 2012 icon should already be displayed on your Citrix main menu page. Click the Microsoft Visual Studio 2012 icon to launch Visual Studio.

You should see a screen similar to the following.

STEP 2: Create Project

.equella.ecollege.com/file/bfe9e5e5-c91c-450f-a8b4-b45a9d02faa3/40/BIS311_W2_iLab.html#top”>Back to Top

(a) Pull down the File menu and select New Project . . . .

(b) In the New Project dialog, ensure that in the left column, under Templates, Visual Basic is selected; and that in the center column, Windows Form Application is selected. In the Name field at the bottom of the dialog, enter PaymentCalculator. Click OK.

(c) A project with a blank form should be displayed, as shown below.

STEP 3: Rename Form

.equella.ecollege.com/file/bfe9e5e5-c91c-450f-a8b4-b45a9d02faa3/40/BIS311_W2_iLab.html#top”>Back to Top

(a) In the Solution Explorer pane on the right side of the screen, right-click on Form1.vb, select Rename, and change the name to PaymentCalculator.vb. Press Enter after entering the new form name.

(b) Click on the form in the center Design pane to select it. In the Properties pane at the bottom right of the screen, change the Text property of the form to Lab 2 Your Name where Your Name = your full name. Remember, you may need to scroll in the Properties pane to find the Text property.

STEP 4: Add Controls to Form

.equella.ecollege.com/file/bfe9e5e5-c91c-450f-a8b4-b45a9d02faa3/40/BIS311_W2_iLab.html#top”>Back to Top

(a) Check that the Toolbox is displayed at the left side of the screen. If it is not, click the Toolbox tab at the center left edge of the screen to expand the Toolbox, and click the pushpin symbol at the right side of the Toolbox title bar to pin it open.

(b) If necessary, click the Common Controls heading in the Toolbox to expand it. Drag four Label controls, three TextBox controls, and one Button control from the Common Controls area of the Toolbox onto the form, and arrange them on the form as shown below.

(c) If you received an error message, or if your application did not work correctly, apply the methods for finding and fixing programming errors described in the reading assignment to debug your application. Post in the Q & A Forum or contact your professor for assistance if needed.

(d) When your application runs and works correctly, capture a screenshot of the form showing the input and output values given above. Remember, use Ctrl+Alt+PrintScreen to capture a screenshot. Paste your screenshot image into a Word document. Select and copy your code for the button-click event and also paste this into the Word document. Save the Word document as Lab2YourFirstLastName.docx (where YourFirstLastName = your first and last name; e.g., JohnSmith) and submit it to the appropriate Dropbox

 

BIS 311 DeVry Week 3 iLab

iLAB OVERVIEW

Scenario/Summary

In this lab, you will implement a tax calculator application that meets the following business requirements:

Tax Calculator Business Requirements

The application will accept as inputs the individual’s income and number of dependents. The application will calculate the individual’s total deductions as a standard deduction of $6,000 plus a deduction of $1,000 per dependent. The application will calculate the individual’s adjusted gross income as the income minus the total deductions. The application will then calculate the tax owed using the following tax table.

Adjusted Gross Income Tax
Less than or equal to $10,000 Adjusted gross income × 10%
Greater than $10,000 and less than or equal to $40,000 $1,000 + (Adjusted gross income – $10,000) × 15%
Greater than $40,000 and less than or equal to $100,000 $5,500 + (Adjusted gross income – $40,000) × 25%
Greater than $100,000 $20,500 + (Adjusted gross income – $100,000) × 35%

 

As output, the application will display to the user the tax owed, formatted as currency with a dollar sign and cents.

Tax Calculator TOE Chart:

Task Object Event
Get the following inputs from the user:    
Check amount txtIncome  
Number of dependents txtDependents  
Perform the following processing: btnCalcTax Click
Calculate total deductions = 6000 + Number of dependents × 1000    
Calculate adjusted gross income = Income – Total deductions    
Calculate tax owed using tax table in requirements    
Display the following output to the user:    
Tax owed formatted as currency with $ and cents lblTaxOwed  

 

Pseudocode for Tax Calculator Application

Start

Declare numeric constants for

Standard deduction =6000

Dependent deduction =1000

Income bracket 1=10000

Rate1=0.10

Income bracket 2=40000

Base2=1000

Rate2=0.15

Income bracket 3=100000

Base3=5500

Rate3=0.25

Base4=20500

Rate4=0.35

Declare numeric variables for

Income

Number of dependents

Total deductions

Adjusted gross income

Tax owed

Get inputs:

Income

Number of dependents

Calculate Total deductions =Standard deduction +(Number of dependents *Dependent deduction)

Calculate Adjusted gross income =Income-Total deductions

If Adjusted gross income is less than or equal to Income bracket 1 Then

CalculateTax owed =Adjusted gross income * Rate 1

Else If Adjusted gross income is less than or equal to Income bracket 2

Calculate Tax owed =Base 2 + (Adjusted gross income – Income bracket 1) * Rate 2

Else If Adjusted gross income is less than or equal to Income bracket 3

Calculate Tax owed =Base3 + (Adjusted gross income – Income bracket 2) * Rate 3

Else

Calculate Tax owed = Base 4 + (Adjusted gross income -Income bracket 3) * Rate 4

End If

Display Tax owed formatted as currency with $ and cents

Stop

NOTE: The above is a simplified version of tax calculations for purposes of this lab. Although the basic principles of a graduated income tax are illustrated here, real taxes are more complicated, and the rates and brackets are different. Please do not use this simple application to calculate your real taxes.

Deliverables

Submit a Word document named Lab3YourFirstLastName.docx (where YourFirstLastName = your first and last name; e.g., Lab3JohnSmith.docx) containing the following:

Screenshots of form showing the application running, with the following correct input and output values displayed in the form.

  • Income = 9,000, Number of dependents = 1, Tax owed = $200.00
  • Income = 25,000, Number of dependents = 2, Tax owed = $2,050.00
  • Income = 70,000, Number of dependents = 3, Tax owed = $10,750.00
  • Income = 150,000, Number of dependents = 4, Tax owed = $34,500.00

Copy of button-click event code

Category Points % Description
Create and rename form 5 10% Windows form was created and renamed TaxCalculator.vb. Form text property was set to Lab 3 Your Name (where Your Name = your full name).
Add controls to form 5 10% The following controls were added to the form: Identifying labels and text boxes for entry of income and number of dependents; Calculate Tax button; and label for display of tax owed. Controls are arranged on form in a logical and visually pleasing layout.
Set properties (name and text) for controls 5 10% Name and text properties of all controls were set appropriately, with no typos or spelling errors.
Code button-click event 15 30% Button-click event code was entered that corresponds to the given pseudocode, with no syntax errors.
Test-run application successfully 20 40% Application is shown running successfully with no errors, with valid inputs and correct output for each of the four specified test cases.
Total 50 100%  

 

Required Software

Log in to the Citrix iLab site as you did in the previous labs. The Microsoft Visual Studio 2012 icon should be displayed already on your Citrix main menu page. Click the Microsoft Visual Studio 2012 icon to launch Visual Studio.

(a) Pull down the File menu and select New Project . . . .

(b) In the New Project dialog, ensure that in the left column, under Templates, Visual Basic is selected; and that in the center column Windows Form Application is selected. In the Name field at the bottom of the dialog, enter TaxCalculator. Click OK. (

(a) Drag the following controls from the ToolBox onto the form, arrange them in a logical fashion, and set their properties as indicated in the table below.

Control Name Property Text Property
Label Label1 Income:
TextBox txtIncome  
Label Label2 Number of dependents:
TextBox txtDependents  
Button btnCalcTax Calculate Tax Owed
Label lblTaxOwed Your tax owed will display here

(b) Ensure that all controls are positioned and sized so that the form has a neat, professional appearance and none of the text is cut off. Your completed form should look similar to the following.

(c) Your form should appear. Test your application using the following test cases. For each test case, enter the indicated values for Income and Number of dependents; click the Calculate Tax button; and check that the amount displayed for the tax owed is correct. Capture a screenshot showing the results of each correct test case and paste into a Word document. Remember, use CTRL+ALT+PrintScreen to capture a screenshot.

Test case # Income Number of dependents Tax owed
1 9,000 1 $200.00
2 25,000 2 $2,050.00
3 70,000 3 $10,750.00
4 150,000 4 $34,500.00

 

For example, the screenshot for test case #1 should look as follows:

(c) If you receive an error message or your application did not work correctly, debug the application and try again. Post in the Q & A Forum or contact your professor for assistance if needed.

(d) When your application works correctly for all the test cases, select and copy the code for the button-click event and paste it into your Word document below the four test case screenshots. Save the Word document containing the four test case screenshots and your button-click event code asLab3YourFirstLastName.docx (where YourFirstLastName = your first an

 

BIS 311 DeVry Week 4 iLab

iLAB OVERVIEW

Scenario/Summary

In this lab, you will implement a grade calculator application that meets the following business requirements:

Grade Calculator Business Requirements

The user types the number of grades he or she wishes to enter in a text box. When the user clicks a button, the application enters a loop that accepts the specified number of grades and totals them up. The application then displays the entered grades and their average, formatted to two decimal places.

Grade Calculator TOE Chart

Task Object Event
Get the following inputs from the user:    
Number of grades to enter txtNumGrades  
Each grade Input box  
Perform the following processing: btnCalcAvgGrade Click
Add up the total of all grades    
Divide the total by the number of grades to calculate the average    
Display the following outputs:    
Each grade txtGrades  
Average grade formatted with two decimal places lblAverage  

 

Pseudocode for Grade Calculator Application

Start

Declare numeric constant for Maximum number of grades =100

Declare numeric variables for:

Number of grades

Grade

Total of grades (initialize to 0)

Average grade

Declare numeric array GradeArray able to hold the Maximum number of grades

Get the Number of grades

Repeat for each grade up to Number of grades

Get the Grade

Store the Grade in the GradeArray array

Add the Grade to the Total of grades

End Repeat

Calculate Average grade =Total of grades/Number of grades

Repeat for each GradeArray element up to Number of grades

Display the GradeArray element

End Repeat

Display the Average grade formatted with two decimal places

Stop

Deliverables

Submit a Word document named Lab4YourFirstLastName.docx (where YourFirstLastName = your first and last name; e.g., Lab4JohnSmith.docx) containing the following:

  • Screenshot of form showing the application running, with 10 grades entered and displayed along with the correct average.
  • Copy of button-click event code

Category

Step 2: Rename Form and Add Controls

.equella.ecollege.com/file/9c975e7b-3ccf-4cf6-9005-6cf86e077540/34/BIS311_W4_iLab.html#top”>Back to Top

(a) In the Solution Explorer pane on the right side of the screen, right-click on Form1.vb, select Rename, and change the name to GradeCalculator.vb. Press Enter after entering the new form name.

(b) Change the Text property of the form to Lab 4 Your Name (where Your Name = your full name), as you have done in previous labs.

(c) Drag the following controls from the ToolBox onto the form, arrange them in logical fashion, and set their properties as indicated in the table below:

Control Name Property Text Property Multiline Property ScrollBars Property ReadOnly
Label Label1 Enter number of grades:      
TextBox txtNumGrades        
Button btnCalcAvgGrade Get Grades and Calculate Average      
Label Label2 Grades entered:      
TextBox txtGrades   True Vertical True
Label lblAverage Average will display here      

(d) Ensure that all controls are positioned and sized so that the form has a neat, professional appearance and none of the text is cut off. Your completed form should look similar to the following.

Step 3: Code Button-Click Event

.equella.ecollege.com/file/9c975e7b-3ccf-4cf6-9005-6cf86e077540/34/BIS311_W4_iLab.html#top”>Back to Top

(a) Double-click the button on the form to open the code editor with a template for the button-click event procedure.

(b) Starting where the cursor is positioned, in between the line beginning Private Sub btnCalcAvgGrade_Click( . . . and the line End Sub, enter the following code.

Code for Button-Click Event

‘Get grades and calculate average

‘Declare constants and variables

Const intMAX_NUM_GRADES As Integer = 100

Dim intNumGrades As Integer

Dim intGrade As Integer

Dim intTotal As Integer = 0

Dim dblAverage As Double

Dim intGradeArray(intMAX_NUM_GRADES – 1) As Integer

‘Get the number of grades

Integer.TryParse(txtNumGrades.Text, intNumGrades)

‘Loop to accept grades and add up total

For intGradeNumber As Integer = 1 To intNumGrades

Integer.TryParse(InputBox(“Enter grade #” & intGradeNumber), intGrade)

intGradeArray(intGradeNumber – 1) = intGrade

intTotal += intGrade

Next intGradeNumber

‘Calculate average grade

dblAverage = intTotal / intNumGrades

‘Loop to display each grade entered

For intGradeNumber As Integer = 1 To intNumGrades

txtGrades.Text += “Grade #” & intGradeNumber & ” = ” & intGradeArray(intGradeNumber – 1) & vbCrLf

Next intGradeNumber

‘Display average

lblAverage.Text = “The average grade is ” & Format(dblAverage, “Standard”)

The code editor window should look like the following after you have entered your code.

Step 4: Test, Debug, and Submit

.equella.ecollege.com/file/9c975e7b-3ccf-4cf6-9005-6cf86e077540/34/BIS311_W4_iLab.html#top”>Back to Top

(a) Run the application by doing one of the following: click the Start button; pull down the Debug menu and select Start Debugging; or press the F5 key.

(b) Your form should appear. Test your application by entering the value 10 as the number of grades and clicking the Start button. An input box should appear, prompting you to enter a grade. Enter the first grade from the list of test data below and click the OK button in the input box. Continue entering the test grades, clicking OK after each one, until all grades have been entered.

Grade # Grade
1 60
2 93
3 89
4 61
5 60
6 70
7 85
8 76
9 76
10 92

 

During the grade entry process, your screen should look like the following.

(c) After you enter the last grade, the application should display all the grades and the average. Your screen should look as follows:

(d) If you receive an error message or your application does not work correctly, debug the application and try again. Post in the Q & A Forum or contact your professor for assistance if needed.

(e) When your application works correctly, capture a screenshot of the form showing the 10 grades entered and the average, and paste it into a Word document. Remember, use CTRL+ALT+PrintScreen to capture a screenshot. Also select and copy your button-click event code and paste it into the Word document. Save the Word document asLab4YourFirstLastName.docx (where YourFirstLastName = your first and last name; e.g., JohnSmith) and submit it to the appropriate dropbox.

 

BIS 311 DeVry Week 5 iLab

iLAB OVERVIEW

Scenario/Summary

In this lab, you’ll implement an application that performs a simple sales tax calculation. The new feature of this application, compared to what you have done in previous iLabs, is that the values entered by the user will be checked for validity. If the amounts entered are invalid, the application will display appropriate error messages to the user. If the input data are valid, the application will calculate the sales tax due and the total, including tax.

Sales Tax Application Business Requirements

The user enters an order amount and a sales tax percent. The order amount must be numeric and greater than 0. The 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 invalid, appropriate error messages will be displayed to the user. If the input data are valid, the application will calculate the sales tax by multiplying the order amount by the sales tax percent, and will calculate the order total, including tax, by adding the order amount and the sales tax. The sales tax and the order total, including tax, will be displayed to the user.

TOE Chart for Sales Tax Application

Task Object Event
Get the following inputs from the user:    
Order amount txtOrderAmount  
Sales tax percent txtTaxPercent  
Perform the following processing: btnCalcTotal Click
Validate inputs    
Calculate Tax = Order amount * Sales tax percent    
Calculate Order total = Order amount + Tax    
Display the following outputs:    
Error messages (if input invalid) lstMessages  
Tax (if input valid) lstMessages  
Order total (if input valid) lstMessages  

 

Pseudocode for Sales Tax Application

Start button-click event handler

Declare numeric variables for

Order amount

Sales tax percent

Tax

Order total

Declare string variables for

Order amount message

Sales tax percent message

Declare Boolean variable for

Inputs valid (initialize to True)

Clear messages

Call ValidateOrderAmount function with Order amount, returning Order amount message

If Order amount message is not empty (i.e. there was an error)

Display Order amount message

Set Inputs valid to False

End If

Call ValidateSalesTaxPercent function with Sales tax percent, returning Sales tax percent message

If Sales tax percent message is not empty (i.e. there was an error)

Display Sales tax percent message

Set Inputs valid to False

End If

If Inputs valid is True

Get Order amount

Get Sales tax percent

Calculate Tax = Order amount * Sales tax percent

Calculate Order total = Order amount + Tax

Display Tax

Display Order amount

End If

Stop button-click event handler

Start ValidateOrderAmount function (Order amount)

If Order amount is not numeric

Set Order amount message to “Please enter a numeric order amount.”

Else If Order amount is less than or equal to zero

Set Order amount message to “Please enter an order amount greater than zero.”

Else

Set Order amount message to the empty string (no error)

End If

Return Order amount message

Stop ValidateOrderAmount

Start ValidateSalesTaxPercent (Sales tax percent)

If Sales tax percent is not numeric

Set Sales tax percent message to “Please enter a numeric sales tax percent.”

Else If Sales tax percent is less than zero or greater than 0.14

Set Sales tax percent message to “Please enter a sales tax percent between 0.00 and 0.14.”

Else

Set Sales tax percent message to the empty string(no error)

End If

Return Sales tax percent message

Stop ValidateSalesTaxPercent

Deliverables

  • Submit a Word document named Lab5YourFirstLastName.docx (where YourFirstLastName = your first and last name; e.g., Lab5JohnSmith.docx) containing the following:
  • Screenshot of form showing the application running, with non-numeric entries for Order amount and Sales tax percent, and appropriate error messages displayed.
  • Screenshot of form showing the application running, with out-of-range entries for Order amount and Sales tax percent, and appropriate error messages displayed.
  • Screenshot of form showing the application running, with valid entries for Order amount and Sales tax percent, and correct Tax and Order total results displayed.
  • Copy of code for button-click event, ValidateOrderAmount function, and ValidateSalesTaxPercent function.
Category Points % Description
Create and rename form 5 10% Windows form was created and renamed SalesTax.vb. Form text property was set toLab 5 Your Name (where Your Name = your full name).
Add controls to form 5 10% The following controls were added to the form: Identifying labels and text boxes for entry of order amount and sales tax percent; button to calculate total including tax; and list box for display of error messages and results.
Set properties for controls 5 10% Name and text properties of all controls were set appropriately, with no typos or spelling errors.
Code button-click event 5 10% Button-click event code was entered that corresponds to the given pseudocode, with no syntax errors.
Code ValidateOrderAmount function 5 10% Function code was entered that corresponds to the given pseudocode, with no syntax errors.
Code ValidateSalesTaxPercent function 5 10% Function code was entered that corresponds to the given pseudocode, with no syntax errors.
Test-run application successfully 20 40% Application is shown running successfully with screen shots for each of the three test cases:

(1) non-numeric entries for order amount and sales tax percent, with appropriate error messages;

(2) out-of-range entries for order amount and sales tax percent, with appropriate error messages; and

(3) valid entries for order amount and sales tax percent, with correct tax and order total results.

Total 50 100%  

 

Required Software

Visual Studio 2012

Access the software at.devry.edu/”>https://lab.devry.edu.

Steps: all

iLAB STEPS

Step 1: Launch Visual Studio and Create Project

.equella.ecollege.com/file/dd98a67d-9ec9-4df4-8603-220cf23d1074/30/BIS311_W5_iLab.html#top”>Back to Top

(a) Log into the Citrix iLab site as you did in the previous labs. Click the Microsoft Visual Studio 2012 icon to launch Visual Studio.

(b) Pull down the File menu and select New Project . . .

(c) In the New Project dialog, ensure that under Templates in the left column, Visual Basic is selected, and that in the center column, Windows Form Application is selected. In the Name field at the bottom of the dialog, enter SalesTax. Click OK.

Step 2: Rename Form and Add Controls

.equella.ecollege.com/file/dd98a67d-9ec9-4df4-8603-220cf23d1074/30/BIS311_W5_iLab.html#top”>Back to Top

(a) In the Solution Explorer pane on the right side of the screen, right-click on Form1.vb, select Rename, and change the name to SalesTax.vb. Press Enter after entering the new form name.

(b) Change the Text property of the form to Lab 5 Your Name (where Your Name = your full name), as you have done in previous labs.

(c) Drag the following controls from the ToolBox onto the form, arrange them in a logical fashion, and set their properties as indicated in the table below.