Question

In: Computer Science

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 a method that calculates and returns the premium amount, and then display the returned amount.

import java.util.Scanner;
class Insurance {
public static void main (String args[]) {
// Write your code here
}

public static int calculatePremium(int curr, int birth) {
// Write your code here
}
}

Solutions

Expert Solution

Java Code:

import java.util.*;

class Main {

public static void main (String args[]) {

Scanner sc=new Scanner(System.in);

int curr,birth;

System.out.print("Enter Current year: ");

curr=sc.nextInt();

System.out.print("Enter Birth year: ");

birth=sc.nextInt();

System.out.print("Total premium is : $"+calculatePremium(curr,birth));

}

public static int calculatePremium(int curr, int birth) {

int age=curr-birth;

int decade=age/10;

int premium=(decade+15)*20;

return premium;

}

}


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 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...
With a certain medical insurance​ policy, the customer must first pay an annual ​$100 ​deductible, and...
With a certain medical insurance​ policy, the customer must first pay an annual ​$100 ​deductible, and then the policy covers 60​% of the cost of dental work. The first dental insurance claims for a specific year submitted by a person are for two procedures. The first procedure cost ​$700​, and the second procedure cost ​$990. How​ much, in​ total, will he need to pay for these​ procedures?
With a certain medical insurance​ policy, the customer must first pay an annual $350 deductible, and...
With a certain medical insurance​ policy, the customer must first pay an annual $350 deductible, and then the policy covers 80% of the cost of x-rays. The first insurance claims for a specific year submitted by a person are for two x -rays. The first x-ray cost $680 and the second x-ray cost $930. How much, in total, will he need to pay for these x-rays?
With a certain medical insurance​ policy, the customer must first pay an annual ​$100 ​deductible, and...
With a certain medical insurance​ policy, the customer must first pay an annual ​$100 ​deductible, and then the policy covers 80​% of the cost of​ x-rays. The first insurance claims for a specific year submitted by a person are for two​ x-rays. The first​ x-ray cost ​$620​, and the second​ x-ray cost ​$960. How​ much, in​ total, will he need to pay for these​ x-rays?
An insurance company charges an annual premium of $75 for a $200,000 insurance policy against a...
An insurance company charges an annual premium of $75 for a $200,000 insurance policy against a house burning down. If the (empirical) probability that a house burns down in a given year is .0003, what is the expected value of the policy to the insurance company?
Insurance companies charge premiums for each type of insurance policy they issue. Underwriters assess risk for...
Insurance companies charge premiums for each type of insurance policy they issue. Underwriters assess risk for specific types of policies. Premiums are calculated and then charged to the insured. Discuss the adverse selection and moral hazard problems insurance companies face.please do not plagiarize
A customer calls the administrator at the insurance company and gives her policy number. The administrator...
A customer calls the administrator at the insurance company and gives her policy number. The administrator enters the information, and the system displays the basic insurance policy. The administrator then checks the information to make sure that the premiums are current, and the policy is in force. The customer supplies the make, model, year and the vehicle identification number (VIN) of the car to be added. The administrator enters the information, and the system ensures that the given data are...
A colleague tells you that he is purchasing a health insurance policy, but the premiums seem...
A colleague tells you that he is purchasing a health insurance policy, but the premiums seem very high for the level of coverage. Use the following table to classify each explanation for the high premiums as an instance of either adverse selection or moral hazard. Explanation for High Premiums Adverse Selection(yes or no) Moral Hazard (yes or no) The insurance company cannot determine which customers are healthy and which are unhealthy. The insurance company believes that the health insurance will...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT