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
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
Get step-by-step solutions from verified subject matter experts
