Discount Get ALL WEEKS Solution ONLY $0.00
BIS 311 Lab 1 - an Original and A++ Work !!! [$6.99]
BIS 311 Lab 2 - an Original and A++ Work !!! [$8.99]
BIS 311 Lab 3 - an Original and A++ Work !!! [$11.99]
BIS 311 Lab 4 - an Original and A++ Work !!! [$12.99]
BIS 311 Lab 5 - an Original and A++ Work !!! [$12.99]
BIS 311 Lab 6 - an Original and A++ Work !!! [$12.99]
BIS 311 Lab 7 - an Original and A++ Work !!! [$12.99]
Get Selected Weeks Solution with ONLY NOT Add Selected Tutorials To Cart
BIS311 BIS 311 - BIS311 iLab 3 - BIS 311 Lab 3 - an Original and A++ Work !!!
    BIS311 BIS 311 - BIS311 iLab 3 - BIS 311 Lab 3 - an Original and A++ Work !!! BIS311 BIS 311 - BIS311 iLab 3 - BIS 311 Lab 3 - an Original and A++ Work !!!

BIS311 BIS 311 - BIS311 iLab 3 - BIS 311 Lab 3 - an Original and A++ Work !!!

$11.99

Lab 3 of 7: A Tax Calculator Class in Visual Basic
Submit your assignment to the Dropbox located on the silver tab at the top of this page.
(See Syllabus “Due Dates for Assignments & Exams” for due dates.)
L A B O V E R V I E W
Scenario and Summary
In this lab, you will implement a tax-calculator application. You’ll start by designing a tax-calculator class. Then, you will create the user interface of the driver program. Last, you will write the code for the button-click event that uses an object of your class. When your driver program is working, it will do a tax calculation that looks like this, with the tax owing formatted as currency.
Deliverables
Section
Deliverable
Points
Step 9
Lab3YourFirstLastName.docx (Word document)
40
Category
Points
%
Create and name a TaxCalculator class.
7
17.5%
Open a class and implement the public properties.
8
20%
Create a form, as shown, and set the properties.
5
12.5%
Code the button-click event.
10
25%
Test it using the sample data provided.
10
25%
Total
40
100%
L A B S T E P S
STEP 1: Open Visual Studio
Open up Visual Studio as usual and start up a new Windows Forms Application project.
Save the project as Lab3YourFirstnameYourLastname.
TIP: To do this, pull down the File menu in Visual Studio, select New, and then select Project. For Project Type, make sure Windows is selected under Visual Basic. For the template, make sure Windows Forms Application is selected. Enter Lab3YourFirstnameYourLastname in the Name box, and click OK.
STEP 2: Go to Project–Add Class
Go to Project -> Add Class to bring up the following screen.
STEP 3: Name the Class
Name the class TaxCalculator.vb as listed in the screen shot above, and then click the Add button.
STEP 4: Open TaxCalculator.vb
In the Solution Explorer window, double click on the TaxCalculator.vb class to display this window.
STEP 5: Implement the Public Properties
Implement the public properties and the calcTax( ) method. When finished, your class code should look like this.
Public Class TaxCalculator
Public income As Double Public Numchildren As Integer Public Function CalcTax() As Double Dim tax As Double tax = income * 0.25 – Numchildren * 150 Return tax End Function
End Class
STEP 6: Design the Driver Program
Now, design your driver program. Double click the form (Form1.vb in the Solution Explorer), and design it so that it looks like the screenshot below. You should set the following properties along with any text properties not listed.
Control
Property
Setting
Textbox1
Name
txtIncome
Textbox2
Name
txtNumchildren
Button1
Name
btnDoTaxCalculation
Button1
Text
Display Tax Owing
Label3
Name
lblDisplay
Label3 (now lblDisplay)
Text
Your tax owing will display here
Form
Text
Lab3YourFirstLastname
TIP: To design the form, drag controls from the Toolbox and drop them where you want them on the form. You should see the Toolbox tab on the left side of the screen in Visual Studio. If it is collapsed against the left side, click it to expand it. Then, click the Pushpin icon (AutoHide) at the top right to lock it into place. For this form, you will need two textboxes, one button, and three labels, all of which are under the Common Controls heading in the Toolbox.
TIP: If you don’t see the Toolbox at all, it may have been closed inadvertently. Pull down the View menu, and click on Toolbox to bring it back.
STEP 7: Write the Button Code
Now, you can write the code for the button-click event. The code should follow the following pseudocode.
Start
Declare Variables CalcTax objCalcTax Numeric taxowing
Get Income, numchildren Taxowing=calcTax() Display taxowing
Stop
Double click the button on the form to open its code window. Then, add code inside the button-click event to make it look like this.
Private Sub btnDoTaxCalculation_Click(ByVal sender As System.Object, ByVale As System.EventArgs) Handles btnDoTaxCalculation.Click
Dim objCalcTax As New TaxCalculator Dim taxowing As Double
objCalcTax.income = txtIncome.Text objCalcTax.Numchildren = txtNumChildren.Text taxowing = objCalcTax.CalcTax()
lblDisplay.Text = “Tax owing is ” & Format(taxowing, “currency”)
End Sub
STEP 8: Test and Debug
Save your form and then test your program using a value of $1,000 for income and a value of 1 for the number of children. You should get a tax owing of $100. Debug any errors until the program runs properly.
STEP 9: Save the Word File
When you get your program working, take a screen shot of your form and place it in a Word file named Lab3YourFirstYourLastName.docx. Save the Word file and submit it to the Lab 3 Dropbox.
Note on Debugging with Breakpoints
There is a useful feature for debugging your programs called breakpoints.
If you get the wrong answer for tax owing, you can set a breakpoint to the left of an instruction. Your program will stop, or break, right there and will allow you to put your mouse over the variables in your program, displaying the program at that point.
Here is a screen shot of a breakpoint set in the button-click event by clicking to the left of its final step.

 

Here is compete solution for BIS311 Lab 3

If you have more questions, please contact me via email support@extutorials.com

I will help you any time

Thank you

Attached Files

Move over [ preview ] file name to preview content in it!

Write a review

Your Name:


Your Review: Note: HTML is not translated!

Rating: Bad           Good

Enter the code in the box below:



PURCHASE SAVE
2 Tutorials 10%
3 Tutorials 13%
4 Tutorials 16%
5 Tutorials 19%
6 Tutorials 22%
7 Tutorials 25%
8 Tutorials 28%
9 Tutorials 31%
10 Tutorials 34%
add url more

9MZQASHWN73B