Question

In: Computer Science

You are creating a program for a huge life insurance company. Yearly payments are determined by...

You are creating a program for a huge life insurance company. Yearly payments are determined by the amount of coverage offered, the age of the customer, and by whether the customer has a pre-existing sickly condition. Payments are calculated as follows:

Ages less than 20 – Yearly premium is 1/2000 th of the total premium. (example: a $500,000 policy would have a $250 yearly premium.)

Ages between 20 and 40 – Yearly premium is 1/1000 th of the total premium.

Ages between 40 and 60 - Yearly premium is 1/800 th of the total premium.

Ages greater than 60 – Yearly premium is 1/500 th of the total premium.

If the customer is sickly or has a risky pre-existing condition, the yearly payment is 2* the value of the normal premium.

Use conditional expressions to determine if a customer is sickly or not.

Use the following prompt for collecting user input:

“ Enter the appropriate number or the range for the customer:

1 : 1 – 20 years old

2 : 20 – 40 years old

3 : 40 – 60 years old

4 : 60 years or older

Use conditional expressions for evaluating

Solutions

Expert Solution

In case of any concern drop me a comment.

I wrote code in java language and try to satisfy all the conditions.

import java.util.Scanner;

public class Insurance {

// Main method for executing the code

public static void main(String[] args) {

int yearlyPremium = 0;

// Creating scanner class object to read the input from keyboard

Scanner sc = new Scanner(System.in);

System.out.println("Enter the coverage amount offered ");

// Getting coverage value and stored in variable

int coverage = sc.nextInt();

System.out.println("Is customer sickly or has a risky pre-existing condition \n Press 1 for Yes or 0 for No ");

int risk = sc.nextInt();

if(risk ==1) // check customer is sick or not

{

yearlyPremium = 2*(coverage/800); //twice of normal premium for sick

}

else // Calculate the premium based on age

{

System.out.println("Enter the appropriate number or the range for the customer:");

System.out.println(" 1 : 1 – 20 years old \n 2 : 20 – 40 years old \n 3 : 40 – 60 years old \n 4 : 60 years or older");

int ageRange = sc.nextInt();

if(ageRange == 1)

yearlyPremium = (coverage/2000);

if(ageRange == 2)

yearlyPremium = (coverage/1000);

if(ageRange == 3)

yearlyPremium = (coverage/800);

if(ageRange == 4)

yearlyPremium = (coverage/500);

}

System.out.println("The yearly premium is " +yearlyPremium+"$.");

}

}


Related Solutions

The number of successful claims on life insurance policies for an insurance company has been determined...
The number of successful claims on life insurance policies for an insurance company has been determined to follow a Poisson process with an average rate of 5 claims per week. If the amount of money paid on each policy is uniformly distributed between $2,000 and $10,000, what is the mean of the total amount of money that the company pays out in a four-week period?
You are the beneficiary of a life insurance policy. The insurance company informs you that you...
You are the beneficiary of a life insurance policy. The insurance company informs you that you have two options for receiving the insurance proceeds. You can receive a lump sum of $60,000 day or receive payments of $641 a month for ten years. You can earn 6.5% on your money. Which.ontion should you take and why? (Show all calculations for full credit.
You are the beneficiary of a life insurance policy. The insurance company informs you that you...
You are the beneficiary of a life insurance policy. The insurance company informs you that you have two options for receiving the insurance proceeds. You can receive a sum payment of 50,000$ today pr receive payments of 641$ a month for 10 years. You can earn 6.5% on your money. Which option should you take if you are most concerned about the value today? How much will you save by taking it? Show work.
You are the beneficiary of a life insurance policy. The insurance company informs you that you...
You are the beneficiary of a life insurance policy. The insurance company informs you that you have two options for receiving the insurance proceeds. You can receive a lump sum of $200,000 today or receive payments of $1,400 a month for 20 years. You can earn 10 percent on your money. Which option should you take and why?
You are the beneficiary of a life insurance policy. The insurance company informs you that you...
You are the beneficiary of a life insurance policy. The insurance company informs you that you have two options for receiving the insurance proceeds. You can receive a lump sum of $200,000 today or receive payments of $1,400 a month for 20 years. You can earn 6 percent on your money. Which option should you take and why?
1. A Life Insurance company offers a perpetuity that pays annual payments of $20,000. This contract...
1. A Life Insurance company offers a perpetuity that pays annual payments of $20,000. This contract sells for $320,000 today. What is the interest rate? 2. Noly Corp. issued preferred stock at $1,000 with a 5.8% dividend. The current rate of return investors require is 6.0%. What is the maximum price investors would be willing to buy for the preferred stock? 3. Crinkle Inc. is selling a product that it expects will generate cash flows of $715,000 every year. The...
4. You are the beneficiary of a life insurance policy. The insurance company informs you that...
4. You are the beneficiary of a life insurance policy. The insurance company informs you that you have two options for receiving the insurance proceeds. You can receive a lump sum of$125,000 today or receive payments of $4,000 a month for forty months. You can earn 12 percent per year on your money. Which option would you take? a) Accept the payments because they are worth $126,570 today. b) Accept the payments because they are worth $131,338 today. c) Accept...
In creating a plan to buy your life insurance, what factors should you consider before buying?...
In creating a plan to buy your life insurance, what factors should you consider before buying? Also, describe from whom you should buy, including the sources. Pls write atleast 300 words.
In creating a plan to buy your life insurance, what factors should you consider before buying?...
In creating a plan to buy your life insurance, what factors should you consider before buying? Also, describe from whom you should buy, including the sources. ( PLEASE DETAILED ANSWER)!!
You have an opportunity to invest in a deal that will make yearly payments forever. These...
You have an opportunity to invest in a deal that will make yearly payments forever. These payments will grow at a rate of 5% per year. You will receive your first payment of 8,000 one year from today. Due to the risks associated with this investment, you will require a return of 15%. How much are you willing to pay for this deal today? Select one: a. 85,000 b. 87,500 c. 80,000 d. 100,000 The firm makes no use of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT