Question: java Q3. Write a program that implements the following algorithm: 1.Get baseSalary 2. Get noOfService Years. 3. Calculate bonus using the following formula: if (noOfServiceYears

java java Q3. Write a program that implements the following algorithm: 1.Get baseSalary

Q3. Write a program that implements the following algorithm: 1.Get baseSalary 2. Get noOfService Years. 3. Calculate bonus using the following formula: if (noOfServiceYears is less than or equal to five) bonus = 10. noOfService Years otherwise bonus = 20. noOfService Years 4. Get totalSales. 5. Calculate additionalBonus using the following formula: if (totalSales is less than 5000) additionalBonus = 0 otherwise if (totalSales is greater than or equal to 5000 and totalSales is less than 10000) additionalBonus = totalSales (0.03) otherwise additionalBonus = totalSales - (0.06) 6. Calculate payCheck using the equation: payCheck = baseSalary + bonus + additionalBonus

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!