Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The following is an application that requests an employee's name, an employee ID no, and working hours; and then displays the salary. Employee working less
The following is an application that requests an employee's name, an employee ID no, and working hours; and then displays the salary. Employee working less than or equal 40 hours will earn RM10 per hour, and those working more than 40 hours will earn RM10 per hour for first 40 hour plus RM15 per hour of the hour(s) over 40. Use Sub procedures for input and output, and a Function procedure to calculate the salary. Figure 1 shows the sample output. Write the VB codes to execute this program. Salary txt Employeekame txtEmployeeID txtHours Employee's Name: John Employee ID E12345678 Hours: 38 Display Salary Salary for John E12345678 is RM380.00. btnDisplay txtOutput Figure 1 The application should have the following: Objects txtEmployeeName, txtEmployeeld, txtHours, txtOutput, btnDisplay Variables employeeName, employeeld, hours, salary Sub procedures InputData, DisplayOutput Function TotalSalary Private Sub btnDisplay_click(...) Handles btnDisplay.click Dim employeeName As String Dim employeeID As String = Dim hours, salary As Double Input Data (employeeName, employeeID, hours) salary = Totalsalary (hours) DisplayOutput (employeeName, employeeID, salary) End Sub
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started