Question

Please Solve this problem using Visual Basic Programming Language (show design Interface and programming codes): Q....

Please Solve this problem using Visual Basic Programming Language (show design Interface and programming codes):

Q. The Interface provides a text box, for the user to enter his or her current salary. The Calculate Button's Click Event Procedure should calculate the new salary amounts using rates of 2% through 6% in increment's of 0.5%. The procedure should display the rates and salary amounts in the lblNewSalary control. Code the procedure using the For....Next statement. Save the work.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

VB Code:

Public Class SalIncrement

    Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click

        ' Reading current salary from user
        Dim currentSal As Double = Double.Parse(tbSalary.Text)

        Dim newSal As Double

        ' Incrementing at step of 0.5 from 2 to 6
        For increment As Double = 2 To 6 Step 0.5

            ' Calculating new salary
            newSal = currentSal + (currentSal * (increment / 100.0))

            ' Constructing string for writing data to text box
            lblNewSalary.Text += "" & vbNewLine & ("Rate: " + increment.ToString() + "%" & "     " & " New Salary: " + newSal.ToString())

        Next

    End Sub

End Class

-----------------------------------------------------------------------------------------------------------------------------------------------------------------

Sample Output:

OX Salary Increment Cumrent Salary 2500 Calculate Rate: 2% Rate: 2.5% Rate: 3% Rate: 3.5% Rate: 4% Rate: 4.5% Rate: 5% Rate:

Add a comment
Know the answer?
Add Answer to:
Please Solve this problem using Visual Basic Programming Language (show design Interface and programming codes): Q....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • The questions below deal with Microsoft Visual Studio 2012 Reloaded, under the Visual Basic programming language....

    The questions below deal with Microsoft Visual Studio 2012 Reloaded, under the Visual Basic programming language. The book ISBN number that I am using is: 978-1-285-08416-9 or the UPC code is: 2-901285084168-1. Question 1 Visual Basic 2012 is an object-oriented programming language, which is a language that allows the programmer to use ____________________ to accomplish a program�s goal. Question 2 An application that has a Web user interface and runs on a server is called a(n) ____________________ application. Question 3...

  • PLEASE USE VISUAL BASIC* BY VISUAL STUDIO. Visual Basic INTERMEDIATE Create a Windows Forms application. Use...

    PLEASE USE VISUAL BASIC* BY VISUAL STUDIO. Visual Basic INTERMEDIATE Create a Windows Forms application. Use the following names for the project and solution, respectively: Chopkins Project and Chopkins Solution. Save the application in the VB2017\Chap03 folder. Change the form file's name to Main Form.vb. Change the form's name to frmMain. Create the interface shown in Figure 3-37. The interface contains six labels, three text boxes, and two buttons. The application calculates and displays the total number of packs ordered...

  • Open the Gross Pay Solution.sln file contained in the VB2017\Chap08\Gross Pay Solution folder. The interface provides...

    Open the Gross Pay Solution.sln file contained in the VB2017\Chap08\Gross Pay Solution folder. The interface provides a text box for entering the number of hours an employee worked. It also provides a list box for selecting the employee’s pay code. The btnCalc_Click procedure should display the gross pay, using the number of hours worked and the pay rate corresponding to the selected code. The pay codes and rates are listed in Figure 8-47. Employees working more than 40 hours receive...

  • the specific programming language to do this with is Visual Basic what formula? specify what you...

    the specific programming language to do this with is Visual Basic what formula? specify what you mean I want to develop a program which will calculate the total pressure and the hydrostatic pressure on a submerged vehicle in atmospheres. Associate this program with a button on a worksheet. Ask the user to input the specific gravity of the fluid and the submersion depth in feet in an input box. Set a variable for the acceleration of gravity in your code,...

  • An Introduction to Programming Using Visual Basic Tenth Edition Chapter 3 Programming Project 2 What is...

    An Introduction to Programming Using Visual Basic Tenth Edition Chapter 3 Programming Project 2 What is the solution to this project? one of the numbers in an input text box is change the type of Auto Repair Calculator X Customer: John Doe Hours of labor: 3.5 Cost of parts and supplies 84.55 Display Bill + First number 21 Second number 77 х Customer Labor cost Parts cost Total cost John Doe $122.50 $88.78 $211.28 21 x 77 = 1617 FIGURE...

  • Week 5 Programming Lab - Broadway Ticket Group Discount ( Web Design With Visual Basic) Submit...

    Week 5 Programming Lab - Broadway Ticket Group Discount ( Web Design With Visual Basic) Submit Assignment Due No Due Date Points 100 Submitting a text entry box or a file upload Complete the following case programming assignment. To upload and submit the program and materials you created, click the Choose File button to find and select your saved documents. Make sure that the files are saved with your last name in the file name (Example: ch4_case1_Jones.doc). BROADWAY TICKET GROUP...

  • MESSAGE 1 1. Using the Visual Basic Editor, create a VBA procedure named message_1 that does...

    MESSAGE 1 1. Using the Visual Basic Editor, create a VBA procedure named message_1 that does the following: a. Asks the user for their name (using an Input Box). b. Determines the number of slides in the presentation using the appropriate code. c. Displays a message back to the user (using a Message Box) that contains the name entered and the number of slide in the presentation. The message should be something like this: (Hello Sally, there are 8 slides...

  • Please solve the following problem with programming using proper data structures. (Programming Language: Python) A similar...

    Please solve the following problem with programming using proper data structures. (Programming Language: Python) A similar application to the parentheses matching problem comes from hypertext markup language (HTML). In HTML, tags exist in both opening and closing forms and must be balanced to properly describe a web document. This very simple HTML document: Example> Hello, world is intended only to show the matching and nesting structure for tags in the language. Write a program that can check an HTML document...

  • Use Visual Basic language(only basic no, C# or others). Use of Try-Catch Blocks In retail sales,...

    Use Visual Basic language(only basic no, C# or others). Use of Try-Catch Blocks In retail sales, management needs to know the average inventory figure and the turnover of merchandise. Create a project that allows the user to enter the beginning inventory, the ending inventory and the cost of goods sold. Form: Include labeled text boxes for the beginning inventory, the ending inventory, and the cost of goods sold. After calculating the answers. Display the average inventory and the turnover formatted...

  • Problem Statement You are to create a Visual Basic(VB) project for a census bureau to obtain...

    Problem Statement You are to create a Visual Basic(VB) project for a census bureau to obtain and analyze household income survey data within the Pittsburgh   area (including Morgantown Ky). Data Collected: Home identification code (4 alphanumeric characters) – required Program should generate it using a random number generator. You won’t use this anywhere it just need to be generated. Generate the first number in the Form Load event and then each subsequent number in the button click. See attached code...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT