Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The Harrison Group Life Insurance company computes annual policy premiums based

ID: 3744910 • Letter: T

Question

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 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 Write an application that prompts a user for the current year then a birth year. Pass both to a method that calculates and returns the premium amount, and then display the returned amount. Grading Write your Java code in the area on the right. Use the Run button to compile and run the code. Clicking the Run Checks button will run pre- configured tests against your code

Explanation / Answer

import java.util.Scanner; public class InsurancePremium { public static void main(String[] args) { Scanner in = new Scanner(System.in); // add prompts to user if necessary int age = in.nextInt(); int premium = ((age / 10) + 15) * 20; // add extra labels if necessary System.out.println(premium); } }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote