Working for hypothetical insurance company

Assignment Help JAVA Programming
Reference no: EM13168470

Assume that you are working for hypothetical insurance company. This company offers insurance for 4 types of vehicles: cars, trucks, motor cycles and boats. In order to keep the program manageable, we will assume that we do not make a finer distinction among various types that can be found among each type of vehicle. For example, we do not care if it is a small car, or a big car. Your program is required to calculate the applicable insurance premium for a potential customer given the number of vehicles insured. This customer may want insurances for one or more vehicle; you do not know ahead of time the number of vehicles.   Since you have no means of storing the result, you will be printing out the insurance value for each vehicle before proceeding with the calculation for the next vehicle. Once all vehicle insurances are calculated and printed, you will print a summary showing the number of vehicles insured for that person and the total premium due from the customer. You are free to choose other output lines to make the output user friendly.

1.      The base premiums are:

               Passenger car: $297

               Light Truck: $350

               Motor Cycle: $500

               Boat: $297

               These could be treated as Constants for this program.

2.      Multi-vehicle discount: This depends on the accident history.

Accident history:

  • At most one accident in 5 years: No additional charge
    • Multi-vehicle discount allowed using the following rules:

§ 1 vehicle: No discount

§ 2 or 3: 15% discount on the total premium

§ More than 3: 18% discount on the total premium

  • Two to three accidents in 5 years: 20% add on for each vehicle
    • Multi-vehicle discount allowed using the following rules:

§ 1 vehicle: No discount

§ 2 or 3: 7% discount on the total premium (base + accident markup)for that customer

§ More than 3: 10% discount on the total premium (base + accident markup)

  • Four to five accidents in five years: 30% add on for each vehicle; no multi vehicle discount allowed
  • More than 5 accidents in five years: No insurance given to the individual

3.      DUI History: If there is a DUI conviction, the final premium is increased by 7%. The final premium before DUI mark up is calculated as Base Premium + Accident Mark up if any - Multi car discount.

The customer may want one or more vehicles per each type. Here is a sample run:

               Enter number of accidents in last 5 years: 2

               DUI Conviction: yes

               Vehicle :   car

               Next Vehicle: car

               Next Vehicle: Boat

               Output

                              Number of vehicles insured: 3

                              Vehicle types: car, car, boat

                              Base premium: $891.00

                              Accident add-on: $178.20

                              Multicar discount: $74.84

                              DUI Mark Up: $69.60

                              Total Premium: $1063.96

Calculation explanations to help in the program:

               Number of vehicles insured: Count of vehicles

               Vehicle types: self-explanatory

               Base premium: sum of applicable base premiums, in this case car+car+boat

               Accident add-on: 2 accidents, hence 20% add on per vehicle

               Multicar discount: 3 vehicles, hence 7% discount on premium (891+178.20)*0.07

               DUI Mark Up: 7% on total premium (891+178.2-74.87)*.07

               Total Premium: Base + Accident markup - Multicar discount + DUI markup

Name of the Program Class: Insurance.java

Reference no: EM13168470

Questions Cloud

How efficient is the extraction of tea leaves containing : how efficient is the extraction of tea leaves containing 1.0g of caffeine with two 30mL portions of chloroform over that of a single-step extraction? KD= 8.36 at 25 C)
Describe an algorithm that takes as input a list : Describe an algorithm that takes as input a list of n distinct integers and finds the location of the largest even integer in the list or returns 0 if there are no even integers in the list.
What weight of glucose in grammes is required : What weight of glucose in grammes is required to make 675 ml of a 750 mM solution. Glucose Mr = 180.16
Which element has the most atoms- neon oxygen selenium : Which element has the most atoms? 10 grams of neon, 16 grams of oxygen, 32 grams of selenium,
Working for hypothetical insurance company : Assume that you are working for hypothetical insurance company. This company offers insurance for 4 types of vehicles: cars, trucks, motor cycles and boats. In order to keep the program manageable, we will assume that we do not make a finer distin..
Calculate the concentration of nacl : Calculate the volume of a solution NaOH c=0.2 mol/l necessary to neutralize v=200 ml of solution HCl c=0.1 mol/l.
Give examples of appropriate values : Give examples of appropriate values for each of the following type expressions. Do not use the empty list as the value for any list component
Calculate the amount of heat liberated : Calculate the amount of heat liberated (in kJ) from 437 g of mercury when it cools from 61.0°C to 12.0°C.
What is the new m of the hcl and naoh : 39 ml of .2 M HCL and 50 ml of .4 M NaOH are mixed. After mixing, but before they react, what is the new M of the HCL and NaOH?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write an array where the user can input 7 temperatures

Write an array where the user can input 7 temperatures; include a 'for' loop. Make sure the temperatures are larger than -100 and smaller than or equal to 120, if not, make sure the user enters a valid number. Make sure the temperature is between the..

  What makes a program easy to modify

Describe the order of magnitude of the code section using Big(O) notation and Explain the relationship between dynamic storage allocation and recursion.

  A program that reads a four-digit number from the keyb

Write a program that reads a four-digit number from the keyboard as a string and then converts it into decimal. For example, if the input is 1100, the output should be 12. Hint: Break the string into characters and then convert each character to a va..

  Write java program to store values retrieved from user-array

Write a Java program named Arrays6_2GF.java Use an array to store values retrieved from user input. The number of integers to be entered (the length of the array )should also be retrieved through user input.

  Java script program for song

Construct a JavaScript program that declares and prints an array that includes at least twenty of your favorite songs.

  Image to a "black-to-green scale" image

Call a method that will change the image to a "black-to-green scale" image.

  Write a java applet for grade of gas in costco gas station

Write a java applet (not a java application program) for costco gas station. The applet will first ask you whether you are a costco customer, then the grade of gas you want to use.

  Produce a design document

You will design and deliver a website foes fictional client part-1 Website Design Document and produce a design document

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Write a recursive method called maxsum

write a recrusive method called maxSum that accepts a list of integers. L, and an integer limit n as parameters and use backtracking to find the maximum sum that can be generated by adding elements of L that do not exceed n.

  The menu is displayed and the user must select

The menu is displayed and the user must select an option (a number between 0 and 7). The action corresponding to the selection is performed, then the menu is displayed again and the user can choose another option.

  Class that stores information about a report

Create a class that stores information about a report containing multiple currency transactions in multiple currencies. This includes the name of the report and each of the transactions that occurred.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd