Answer to Question #186092 in Visual Basic for Kabelo

Question #186092

Create an application that calculates and displays two raise amounts, which are based on an employee’s current salary. The current salary will be entered by the user. The two raise rates are 5% and 8%. In addition to the raise amounts, the application should also calculate and display the employee’s new salaries. Include a button in the interface that the user can click to clear the user input and calculated results from the screen. 


1
Expert's answer
2021-04-27T09:35:25-0400
Public Class mainForm
    ''' <summary>
    ''' Calculate button press
    ''' </summary>
    ''' <param name="sender"></param>
    ''' <param name="e"></param>
    ''' <remarks></remarks>
    Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click


        Dim current_calary As Double
        current_calary = Double.Parse(txtSalary.Text)
        Dim new_salary_raise_rates_5 As Double = current_calary + current_calary * 0.05D
        Dim new_salary_raise_rates_8 As Double = new_salary_raise_rates_5 + new_salary_raise_rates_5 * 0.08D


        txtSalaryRates5.Text = new_salary_raise_rates_5.ToString()
        txtSalaryRates8.Text = new_salary_raise_rates_8.ToString()
    End Sub
    ''' <summary>
    ''' Clear button press
    ''' </summary>
    ''' <param name="sender"></param>
    ''' <param name="e"></param>
    ''' <remarks></remarks>
    Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
        txtSalary.Text = ""
        txtSalaryRates5.Text = ""
        txtSalaryRates8.Text = ""
    End Sub
End Class




Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS