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.
Write a java
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.

![حطا في حساب سعر التأمين
حسارة شركات التأمين لسيارات بسب ب.
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F624ccb4a-41a0-4c95-afbb-209df5b69419%2F09b9033d-5635-4cf4-b672-25e27ec4dbe9%2Fwl23u28_processed.jpeg&w=3840&q=75)

Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images









