rite a java program to simulate a car insurance We have a problem, which is calculating the insurance price at a unified price for all categories.to solve this problem I want to calculate the insurance price in addition to the factors in the uml. For example, if the individual's age is from 18-25, the insurance rate will increase by 1% over the basic price, as well as the type of car and the gender of the person who wants insurance, for example, if a man also increases 1 % and so are all the factors. If you cannot write the entire program, it is not a problem. Write at least the equations for calculating the insurance or half of the program also You can put random numbers and random prices.

Principles of Information Systems (MindTap Course List)
12th Edition
ISBN:9781285867168
Author:Ralph Stair, George Reynolds
Publisher:Ralph Stair, George Reynolds
Chapter12: Systems Development: Investigation, Analysis, And Design
Section: Chapter Questions
Problem 1SAT
icon
Related questions
Question
100%

Write a java program to simulate a car insurance

We have a problem, which is calculating the insurance price at a unified price for all categories.to solve this problem I want to calculate the insurance price in addition to the factors in the uml. For example, if the individual's age is from 18-25, the insurance rate will increase by 1% over the basic price, as well as the type of car and the gender of the person who wants insurance, for example, if a man also increases 1 % and so are all the factors. If you cannot write the entire program, it is not a problem. Write at least the equations for calculating the insurance or half of the program also You can put random numbers and random prices.


 

Days
City
Total t of
Total
еxpenses
65151
Total income
Profit
contracts
61516
1
1
Jeddah
13541651
Dammam
65146
65166516
65165
What to do.?
1- Total Profit Lweek - month - year)
2- Total contracts LwRsk - month - year)
3. Total expenses (ueek-month- year)
List of accidents
• Phase#1: relationship between age and high accident cost
Phaset2: Increase insurance cost monthly (Auto)
Transcribed Image Text:Days City Total t of Total еxpenses 65151 Total income Profit contracts 61516 1 1 Jeddah 13541651 Dammam 65146 65166516 65165 What to do.? 1- Total Profit Lweek - month - year) 2- Total contracts LwRsk - month - year) 3. Total expenses (ueek-month- year) List of accidents • Phase#1: relationship between age and high accident cost Phaset2: Increase insurance cost monthly (Auto)
حطا في حساب سعر التأمين
حسارة شركات التأمين  لسيارات بسب ب.
Interface
Next meeting
Insurance company class
// data base
Contracts : car insurancel]
Cities : city[]
Accidents : Accident ]
Insurable
25 march
Have license (0: String
Above age() : Boolean
Driver class
// information
Jobs: Jobl]
Age: int
License : String
Owned car :car
Age cost: double []
Cars: carfl { cost for each car}
Cost per insurance tvoe:
doublel] { full, 3" party }
insurance type: Stringl] enum
Accidents cost limit: doublel
Copayment: int[]
Driving experiance : int
car insurance cass
Accident cost: int
Marital status: String
Gender: String
driver : Driver
Car: Car
insurance type: String
driving citv: City
policy date: Date
Job : String
Insurance cost : car insurancel]
Cars : Car[)
insurance cost: double
Main ()
accidents historv: doublel)
Create cites
1- While ( days counter
365)
2- Update situation
fincrease people in each
City dass
<<constructor>> generation
city, increase insurance
cost}
3- Generation random {
new contracts}
people
Accident percentage: int
GDP-intf12-elements}
Jobs: Stringl) (fix}
People : insurable[]
New dav()
Insurance cost : double
4- Generation of accidents
5- Calculate total profit
Car abstract class
car cost: double
Accident cost: int
Insurance cost : car insurance
Milage : int
Model : int (10 years older)
Maker : String
Accident class
Job class
Job name: String
Canlnvolved : Car[O
date : Date
resPersentage : int]
History: String
Jobs cost: double
Mainl) for testing
Van class
sedan dass
000000 2000 2000 0 1500 1300 1200
Insurance cost = Driver + city + car
Sport car class
Transcribed Image Text:حطا في حساب سعر التأمين حسارة شركات التأمين لسيارات بسب ب. Interface Next meeting Insurance company class // data base Contracts : car insurancel] Cities : city[] Accidents : Accident ] Insurable 25 march Have license (0: String Above age() : Boolean Driver class // information Jobs: Jobl] Age: int License : String Owned car :car Age cost: double [] Cars: carfl { cost for each car} Cost per insurance tvoe: doublel] { full, 3" party } insurance type: Stringl] enum Accidents cost limit: doublel Copayment: int[] Driving experiance : int car insurance cass Accident cost: int Marital status: String Gender: String driver : Driver Car: Car insurance type: String driving citv: City policy date: Date Job : String Insurance cost : car insurancel] Cars : Car[) insurance cost: double Main () accidents historv: doublel) Create cites 1- While ( days counter 365) 2- Update situation fincrease people in each City dass <<constructor>> generation city, increase insurance cost} 3- Generation random { new contracts} people Accident percentage: int GDP-intf12-elements} Jobs: Stringl) (fix} People : insurable[] New dav() Insurance cost : double 4- Generation of accidents 5- Calculate total profit Car abstract class car cost: double Accident cost: int Insurance cost : car insurance Milage : int Model : int (10 years older) Maker : String Accident class Job class Job name: String Canlnvolved : Car[O date : Date resPersentage : int] History: String Jobs cost: double Mainl) for testing Van class sedan dass 000000 2000 2000 0 1500 1300 1200 Insurance cost = Driver + city + car Sport car class
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning