Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For this extra credit assignment, this application will calculate and display an employee's gross salary, which is based on the hours worked and pay rate
For this extra credit assignment, this application will calculate and display an employee's gross salary, which is based on the hours worked and pay rate entered by the user. We will be using the combobox (simple style) as shown above. Put in the items 42.0, 42.5, 43.0, 43.5, 44.0, 44.5, 45.0 for the hours and 7.25, 7.50, 7.75, 8.00, 8.50 for the items in the rate combobox. Create your own void method called "CalcGrossPay" which takes in the hours, rate and reference variable grosspay and uses the logic belowto set the gross pay. Using the code below: gross = hours * rate; if (hours > 40) gross = gross + (hours - 40) * rate; By using the reference variable, the gross pay will be set in the calling method and you can display the result in the display label
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