Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Task05: The retirement benefit of an employee can either be calculated as: CurrentBaseSalary * NumberOfComplete YearsOfService. CurrentBaseSalary * NumberOfActualYearsOfService. Write an interactive Java program that
Task05: The retirement benefit of an employee can either be calculated as: CurrentBaseSalary * NumberOfComplete YearsOfService. CurrentBaseSalary * NumberOfActualYearsOfService. Write an interactive Java program that prompts for and reads the current base salary of an employee and the actual number of years he has served (a double value). It then computes and prints the retirement benefit of the employee by using both the above formulas. Note: The NumberOfComplete YearsOfService used in the above formula is an integer value that must be computed by your program; it must not be read. The output of your program must be similar to the sample program runs below Enter base salary [SAR] : 15560.00 Enter actual number of years of service : 12.9 Retirement benefiti = [15560.00 * 12.9] = 200, 724.00 Saudi Riyals Retirement benefit2 = [15560.00 * 12] = 186,720.00 Saudi Riyals Enter base salary [SAR] : 7004.50 Enter actual number of years of service : 8.6 Retirement benefit1 = [7004.50 * 8.6] = 60,238.70 Saudi Riyals Retirement benefit2 = [7004.50 * 8] = 56,036.00 Saudi Riyals Enter base salary [SAR] : twenty thousand Error: Invalid input
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