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 the method called print triangle type.

Write the method called printTriangleType. This method accepts three integer arguments representing the lengths of the sides of a triangle and prints the type of triangle that these sides form. Here are some sample calls to printTriangleType

  Write a program that displays a drawing popular hangman game

Write a program that displays a drawing for the popular hangman game, as shown in Figure 15.32(c). draws a sketch for the hangman game.

  Create a project in eclipse

Create a new project

  Follow the projects suggestion

Be sure that you follow the projects suggestion and create a separate class for the word analysis. An instance of this class and its methods should then be called by your GUI interface.

  Implementation of encryption and steganography in java

This is a project report showing the essential details and coding structures related with the implementation of encryption techniques and steganography in JAVA.

  Create three classes for a customer

a travel manager and have a job of buying a travel package for a customer. You must create three classes for this programming challenge: Customer, Ticket, and TravelManagerDemo.

  Populate a one-dimensional array

Populate a one-dimensional array with the following grades in this order: 93, 61, 72, 45, 84, 51, 70, 83, 96, and 66. Use a loop to call a method from main() that adds

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Print the number of lines the number of words

a java program where im supposed to print the number of lines the number of words and the longest line in a text file!

  Using an array in java

Using an array in Java - have a list of keywords from a web service and have to print out the list of keywords on the screen with one keyword on each line. This is my code

  Be sure to show all declarations

Write a function call that invokes function a. Be sure to show all declarations. However a complete main is not required.

  Write ijvm program to multiply two hexadecimal numbers

Write the IJVM program that multiplies two (hexadecimal) numbers. The user inputs the hex numbers and the result is printed out. The program then accepts another pair of numbers.

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