Question

In: Computer Science

The Harrison Group Life Insurance company computes annual policy premiums based on the age the customer...

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.

Insurance.java

Solutions

Expert Solution

Explanation:

here is the code with the method premium taking the current year and birth year and then returning the premium amount to the main method which asks the user for the current year and birth year and shows the result.

Code:

import java.util.Scanner;

public class Insurance
{
public static int premium(int curr, int birth)
{
int age = curr - birth;
       int decades = age/10;
      
       return (decades+15)*20;
}
   public static void main(String[] args) {
      
       Scanner sc = new Scanner(System.in);
      
       System.out.print("Enter current year: ");
       int curr = sc.nextInt();
      
       System.out.print("Enter birth year: ");
       int birth = sc.nextInt();
      
      
       System.out.println("$"+premium(curr, birth));
      
      
      
   }
}

Output:

PLEASE UPVOTE IF YOU FOUND THIS HELPFUL!

PLEASE COMMENT IF YOU NEED ANY HELP!


Related Solutions

The Harrison Group Life Insurance company computes annual policypremiums based on the age the customer...
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 customre'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 and then display the returned...
The Harrison GroupLife Insurance company computes annual policy premiums based on theage the customer...
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...
The Harrison Group Life Insurance company computes annual policypremiums base on the age the customer...
The Harrison Group Life Insurance company computes annual policy premiums base 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(yyyy) and a birth year(yyyy)....
A customer buys a $250,000 life insurance policy with an annual premium of $300. Her probability...
A customer buys a $250,000 life insurance policy with an annual premium of $300. Her probability of dying during the year is 0.001. If she dies, the insurance company will have to give her beneficiary $250,000. a) If there is a 0.001 chance she dies, what is the probability she does not die? b) Fill in the table below, let X= Amount the insurance company makes. X P(X) c) Use a computer or calculator: What is the insurance company’s expected...
A random sample of 45 life insurance policy holders showed that the average premiums paid on...
A random sample of 45 life insurance policy holders showed that the average premiums paid on their life insurance policies was $345 per year with a sample standard deviation of $65. Construct a 90% confidence interval for the population mean. Make a statement about this in context of the problem.
I am offered by life insurance companies and financial firms. The customer pays periodic premiums or...
I am offered by life insurance companies and financial firms. The customer pays periodic premiums or a lump sum in return for a payment each year upon retirement. Who am I? a. a defined contribution plan b. a defined benefit plan c. an annuity d. Social Security e. long-term care insruance IRAs and 401(k) plans are examples of a. pension plans administered by the federal government. b. pension plans administered by different state governments. c. pension plans administered by the...
Joan paid $10,000 in premiums for her whole life insurance policy that now has an $11,000...
Joan paid $10,000 in premiums for her whole life insurance policy that now has an $11,000 cash value. How much must she include in her income, if any, if she takes a $10,000 cash value loan from the policy?
Richard, age 35, owns an ordinary life insurance policy in the amount of $250,000. The policy...
Richard, age 35, owns an ordinary life insurance policy in the amount of $250,000. The policy is a participating policy that pays dividends. Richard has a number of financial goals and objectives. For each of the following situations, identify a dividend option that could be used to meet Richard's goals. Treat each situation separately. a. Richard finds the premium payments are financially burdensome. He wants to reduce his annual premium outlay. b. Richard has leukemia and is uninsurable. He needs...
For the same amount of premiums in comparison to whole life insurance, term life insurance generally...
For the same amount of premiums in comparison to whole life insurance, term life insurance generally purchases a.a greater amount of coverage. b.less amount of coverage. c.the same amount of coverage. d.a higher deductible. e.a lower deductible. Annual Cost-of-Living-Adjustment (COLA) changes of coverage levels within long-term care insurance, disability insurance, or homeowner's insurance policies is generally deigned to protect policyholders against a.the adverse event occurring. b.lower rates of return. c.lack of insurability. d.the company defaulting on its payments. e.inflation. Over...
1. For the same amount of premiums in comparison to whole life insurance, term life insurance...
1. For the same amount of premiums in comparison to whole life insurance, term life insurance generally purchases a.a greater amount of coverage. b.less amount of coverage. c.the same amount of coverage. d.a higher deductible. e.a lower deductible. 2. Annual Cost-of-Living-Adjustment (COLA) changes of coverage levels within long-term care insurance, disability insurance, or homeowner's insurance policies is generally designed to protect policyholders against a.the adverse event occurring. b.lower rates of return. c.lack of insurability. d.the company defaulting on its payments....
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT