Question: this is visual basics create a new project and name...
This is Visual Basics
- Create a new project and name it as yourlastname-firstname-Assignment2. Save this project in VB folder you created earlier.
- Using form’s Text property, change the title to: Your full name – Assignment 2.
- Form contains four Labels, three TextBoxes, and three Button controls. You use labels to let user know what to enter and what will be displayed; TextBoxes to input your first name, last name, and your income. Buttons to Calculate Tax, Clear Input and Exit program. See below Form Layout with Controls for more details.
- Declare variables to store FirstName, LastName, Income, and what will be displayed in the fourth Label. See below Form. These variables are String type. Income and tax variables are "Currency"
- You will create IF ... Then ... ElseIf structure to calculate tax based on the three brackets.
- 10% tax for Income $0 - $10000 ; 20% tax for income between $10000 - $50000 ; 30% tax for income over $50000.
- Declare constants for three tax rates: 10%, 20%, and 30%.
Note: VB does not use percentages. You must
use numbers: 0.20 for 20% and so
- Const RATE1 As Decimal = 0.2
- Items to note:
- variables names must follow the conventions and rules explained in this week's slides and must have proper data type for the values that will be stored in them.
- Appearance of the form is very important; Make sure that your design is clean; Spelling is important.
- Text property of controls must use the text shown in below Form.
- Clear Input button, clears TextBoxes and replaces the original text in fourth Label: "Your Name and Tax amount will be displayed here".
- Exit button, closes the Form.
- You will write the code for the three buttons.
- Avoid double-clicking on TextBox and Label Controls to create unnecessary code.
- Run the program, enter values for three TextBoxes then click
Calculate Tax button, “<your firstname>
<your lastname> Your Tax ” displays on the label.
- Example: Joe Smith, your tax amount is: $12,450