Friday 29 December 2017

devry bis311 all weeks ilabs latest 2015 november


 devry bis311 all weeks ilabs latest 2015 november

Click Link Below To Buy:

 

http://hwcampus.com/shop/bis311-final-exm/

 

Contact Us:
Hwcoursehelp@gmail.com

 

 

 

ilab 1


iLAB 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 athttps://lab.devry.edu. 
Steps: all
iLAB STEPS
STEP 1: Launch and Configure Microsoft Visual Studio 2012
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
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

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
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 totxtFirstName. 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 totxtLastName 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 tolblFullName 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 btnDisplayand 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
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.
TEP 6: Test, Debug, and Submit
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.











ilab 2




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 (whereYour 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 athttps://lab.devry.edu.

iLAB STEPS

STEP 1: Launch Visual Studio

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

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

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 toPaymentCalculator.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 Namewhere Your Name = your full name. Remember, you may need to scroll in the Properties pane to find the Text property.

TEP 4: Add Controls to Form

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.
(d) 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.
(e) 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 (whereYourFirstLastName = your first and last name; e.g., JohnSmith) and submit it to the appropriate Dropbo

















ilab 3



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) 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.
(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.
(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 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






ilab4



Question
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 (whereYourFirstLastName = 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
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 (whereYourFirstLastName = 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

(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

(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

(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.










ilab 5


Print
iLab 5 of 7: User Interface Validation (50 points)
Note!
Submit your assignment to the Dropbox, located at the top of this page.
(See the Syllabus section "Due Dates for Assignments & Exams" for due dates.)
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 to Lab 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 https://lab.devry.edu.
Steps: all
iLAB STEPS
Step 1: Launch Visual Studio and Create Project
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.
iLab 5: Step 1 Video
Watch the following video to see how to perform Step 1 of this week's lab assignment.
Play00:00MuteFullscreen
Transcript
Step 2: Rename Form and Add Controls
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.
Control Name Property Text Property
Label Label1 Order amount:
TextBox txtOrderAmount
Label Label2 Sales tax percent:
TextBox txtSalesTaxPercent
Button btnCalcTotal Calculate Total Including Tax
ListBox lstMessages
(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.
A Windows form is shown with the title bar text reading “Lab 5 John Doe”. There are four rows of controls. In the first row, on the left is a label with text “Order amount:”, and on the right is an empty text box. In the second row, on the left is a label with text “Sales tax percent:”, and on the right is an empty text box. In the third row is a button with text “Calculate Total Including Tax”. In the fourth row is a list box named lstMessages.
iLab 5: Step 2 Video
Watch the following video to see how to perform Step 2 of this week's lab assignment.
Play00:00MuteFullscreen
Transcript
Step 3: Code Button-Click Event and Validation Functions
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 Private Sub btnCalcTotal_Click(. . . and the line End Sub, enter the following code.
Button-Click Event Code
'Declare variables
Dim decOrderAmount As Decimal
Dim decSalesTaxPercent As Decimal
Dim decTax As Decimal
Dim decOrderTotal As Decimal
Dim strOrderAmountMessage As String
Dim strSalesTaxPercentMessage As String
Dim blnInputsValid As Boolean = True
'Clear messages
lstMessages.Items.Clear()
'Validate order amount
strOrderAmountMessage = ValidateOrderAmount(txtOrderAmount.Text)
If strOrderAmountMessage <> "" Then
lstMessages.Items.Add(strOrderAmountMessage)
blnInputsValid = False
End If
'Validate sales tax percent
strSalesTaxPercentMessage = ValidateSalesTaxPercent(txtSalesTaxPercent.Text)
If strSalesTaxPercentMessage <> "" Then
lstMessages.Items.Add(strSalesTaxPercentMessage)
blnInputsValid = False
End If
'Perform processing if inputs are valid
If blnInputsValid = True Then
Decimal.TryParse(txtOrderAmount.Text, decOrderAmount)
Decimal.TryParse(txtSalesTaxPercent.Text, decSalesTaxPercent)
decTax = decOrderAmount * decSalesTaxPercent
decOrderTotal = decOrderAmount + decTax
lstMessages.Items.Add("The sales tax is " & Format(decTax, "Currency"))
lstMessages.Items.Add("The total including tax is " & Format(decOrderTotal, "Currency"))
End If
(c) Position your cursor at the end of the End Sub line that closes the button-click event procedure. Press Enter twice to insert blank lines. At this position, below the End Sub for the button-click event procedure and above the End Class statement, enter the following code for the validation functions.
Validation Function Code
Function ValidateOrderAmount(strOrderAmount As String) As String
'Validate order amount
Dim strOrderAmountMessage As String
If Not IsNumeric(strOrderAmount) Then
strOrderAmountMessage = "Please enter a numeric order amount."
ElseIf Val(strOrderAmount) <= 0 Then
strOrderAmountMessage = "Please enter an order amount greater than zero."
Else
strOrderAmountMessage = ""
End If
Return strOrderAmountMessage
End Function
Function ValidateSalesTaxPercent(strSalesTaxPercent As String) As String
'Validate sales tax percent
Dim strSalesTaxPercentMessage As String
If Not IsNumeric(strSalesTaxPercent) Then
strSalesTaxPercentMessage = "Please enter a numeric sales tax percent."
ElseIf Val(strSalesTaxPercent) < 0 Or Val(strSalesTaxPercent) > 0.14 Then
strSalesTaxPercentMessage = "Please enter a sales tax percent between 0.00 and 0.14."
Else
strSalesTaxPercentMessage = ""
End If
Return strSalesTaxPercentMessage
End Function
(d) After entering all the code, your code editor window should look like this.
The Visual Basic code editor window is shown. The code for the button-click event handler is between the line beginning Private Sub btnCalcTotal_Click(. . . and the line End Sub. The code for the two validation functions is between the End Sub for the button-click event handler and the End Class line at the bottom of the window.
(e) Pull down the File menu and select Save All to save your work. If a Save Project dialog appears, ensure that the project is saved to the My DocumentsVisual Studio 2012Projects folder under your DSI number. Click Save.
iLab 5: Step 3 Video
Watch the following video to see how to perform Step 3 of this week's lab assignment.
Play00:00MuteFullscreen
Transcript
Step 4: Test, Debug, and Submit
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 using the following test cases. For each test case, enter the indicated values for Order amount and Sales tax percent; click the Calculate Total Including Tax button; and check that the messages displayed in the list box are correct. Capture a screenshot showing the results of each correct test case and paste it into a Word document. Remember to use CTRL+ALT+PrintScreen to capture a screenshot.
Test case # Order amount Sales tax percent Messages
1 abc def
Please enter a numeric order amount.
Please enter a numeric sales tax percent.
2 -1 0.15
Please enter an order amount greater than 0.
Please enter a sales tax percent between 0 and 0.14.
3 100.00 0.10
The sales tax is $10.00.
The total including tax is $110.00.
As an example, the screenshot for Test Case 1 should look as follows.
The form for the application is shown. “abc” is entered in the text box for Order amount and “def” is entered in the text box for Sales tax percent. In the list box, the messages “Please enter a numeric order amount” and “Please enter a numeric sales tax percent” are displayed
(c) If 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.
(d) When your application works correctly for all test cases, select and copy all the code for the button-click event handler, the ValidateOrderAmount function, and the ValidateSalesTaxPercent function, and paste it into your Word document below the three test case screenshots. Save the Word document as Lab5YourFirstLastName.docx (where YourFirstLastName = your first and last name; e.g., JohnSmith) and submit it to the appropriate dropbox.
iLab 5: Step 4 Video
Watch the following video to see how to perform Step 4 of this week's lab assignment.
Play00:00MuteFullscreen
Transcript













ilab 6
iLAB OVERVIEW
Scenario/Summary
For this lab, you'll create an application that is, in many ways, similar to the sales tax calculator you built last week. What is different this week is not what the application does, but how it does it. You will create an Order class to represent the order, with properties to hold the order amount and the sales tax percent values, and a method to calculate the order total. You will also create a user interface to get the input values from the user, instantiate an object of the Order class, call its calculation method to determine the order total, and display the total to the user.
Order Calculator Application Business Requirements
The user enters an order amount and a sales tax percent. If the order amount is greater than $100, a discount of 10% will be applied to the order amount. If the order amount is less than or equal to $100, no discount is applied. The sales tax is calculated by multiplying the order amount (after discount, if applicable) by the sales tax percent. The order total is calculated by adding the order amount (after discount, if applicable) to the sales tax. The order total is displayed as output to the user.
TOE Chart for Order Calculator Application User Interface
Task
Object
Event
Get the following inputs from the user:
Order amount
txtOrderAmount
Sales tax percent
txtSalesTaxPercent
Perform the following processing:
Calculate order total after discount with tax
btnCalcTotal
Click
currentOrder
Display the following outputs:
Order total
lblTotal
Notice that the TOE chart lists a currentOrder object as being involved with the processing, in addition to the usual button. Also notice that the details of how to perform the order total calculation are not listed on this TOE chart. This is because the details of how to perform the calculation will be handled by the currentOrder object, so the application's user interface does not need to be concerned with how this is done. The details of the calculation are encapsulated within the object.
Pseudocode for Order Calculator Application User Interface
Start button-click event handler
Instantiate currentOrder object from Order class
Get from user
OrderAmount property of currentOrder
SalesTaxPercent property of currentOrder
Display result of GetTotalAfterDiscount() method of currentOrder to user
Stop button-click event handler
Class Diagram for Order Class
Order
+numeric OrderAmount
+numeric SalesTaxPercent
GetTotalAfterDiscount()
Pseudocode for GetTotalAfterDiscount() Method of Order Class
Numeric GetTotalAfterDiscount()
Declare numeric variables for
Discount
TotalAfterDiscount
If OrderAmount > 100
Discount=0.10
Else
Discount=0
TotalAfterDiscount = (OrderAmount - OrderAmount * Discount) * (1 + SalesTaxPercent)
Return TotalAfterDiscount
End GetTotalAfterDiscount()

Deliverables

Submit a Word document named Lab6YourFirstLastName.docx (where YourFirstLastName = your first and last name; e.g., Lab6JohnSmith.docx) containing the following.
  • Screenshot of form showing the application running, with order amount less than or equal to $100 and valid sales tax percent entered, and correct order total displayed
  • Screenshot of form showing the application running, with order amount greater than $100 and valid sales tax percent entered, and correct order total displayed
  • Copy of code for button-click event
  • Copy of code for Order class
Category
Category
Points
%
Description
Create and rename form
5
10%
Windows form was created and named OrderCalculator.vb. Form text property was set to Lab 6 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 order total; and label for display of 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
10
20%
Button-click event code was entered that corresponds to the given pseudocode, with no syntax errors.
Code Order class
10
20%
Code for Order class was entered that corresponds to the given class diagram and pseudocode, with no syntax errors. Class includes the Ord



No comments:

Post a Comment