2.0k views
0 votes
The Harrison Group Life Insurance company computes annual policy premiums based on the age the customer turns in the current calendar year. The premium is computed depending on the users age.

If the user is under the age of 50 – it is calculated by taking the decade of the customer’s age, adding 15 to it, and multiplying by 20. For example, a 34-year-old would pay $360, which is calculated by adding the decades (3) to 15, and then multiplying by 20.
If the user is over 50 – it is calculated by taking the decade of the customer’s age, adding 20 to it, and multiplying by 25. For example, a 54-year-old would pay $625, which is calculated by adding the decades (5) to 20, and then multiplying by 25.
Write an application that:

Declares the variables needed.
Prompts a user for their decade age (be clear in the instructions that you want only the 10s or 100s place).
Hits an IF statement that will call on a method named calculaterate and will pass it the decade, the addition number and the multiplier based on that IF statement.
The method should calculate the premium and return it to the main method.
The main will then display it out to the user.
The user will then be asked if they want to enter in another number. (While or Do While – your Choice) in persudo code please

User Gfkri
by
3.2k points

1 Answer

3 votes

Answer:

yea that is correct hope this works

User Surya Chereddy
by
4.0k points