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.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
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.

Interface
Next meeting
Insurance company class
// data base
Contracts : car insurancel]
Cities : city[]
Accidents : Accident ]
Insurable
25 march
Have license (): String
Above age() : Boolean
Driver class
Age : int
License : String
// information
Jobs: Jobl]
Age cost: double []
Cars: carl] { cost for each car}
Cost per insurance tvoe:
doublel) { full , 3d party }
insurance type: Stringl] enum
Accidents cost limit: doublel]
Copayment: intl]
Owned car :car
Driving experiance : int
car insurance cass
Accident cost: int
driver : Driver
Car : Car
Marital status: String
Gender: String
insurance type: String
driving citv: City
policy date: Date
insurance cost: double
accidents historv: doublel)
Job : String
Insurance cost : car insurance(]
Cars : Car[)
Main ()
Create cites
1- While ( days counter
365)
2- Update situation
fincrease people in each
City dass
<<constructor>> generation
city, increase insurance
people
Accident percentage: int
GDP-int12-elerments}
Jobs: Stringl] {fix}
People : insurablel]
New day()
cost}
3- Generation random {
new contracts}
4- Generation of accidents
5- Calculate total profit
Car abstract class
Transcribed Image Text:Interface Next meeting Insurance company class // data base Contracts : car insurancel] Cities : city[] Accidents : Accident ] Insurable 25 march Have license (): String Above age() : Boolean Driver class Age : int License : String // information Jobs: Jobl] Age cost: double [] Cars: carl] { cost for each car} Cost per insurance tvoe: doublel) { full , 3d party } insurance type: Stringl] enum Accidents cost limit: doublel] Copayment: intl] Owned car :car Driving experiance : int car insurance cass Accident cost: int driver : Driver Car : Car Marital status: String Gender: String insurance type: String driving citv: City policy date: Date insurance cost: double accidents historv: doublel) Job : String Insurance cost : car insurance(] Cars : Car[) Main () Create cites 1- While ( days counter 365) 2- Update situation fincrease people in each City dass <<constructor>> generation city, increase insurance people Accident percentage: int GDP-int12-elerments} Jobs: Stringl] {fix} People : insurablel] New day() cost} 3- Generation random { new contracts} 4- Generation of accidents 5- Calculate total profit Car abstract class
<<constructor> generation
city, increase insurance
cost}
3- Generation random {
new contracts}
people
Accident percentage: int
GDP-int{12-elements}
Jobs: Stringl] (fix}
People : insurable]
New dav()
4- Generation of accidents
5- Calculate total profit
Car abstract class
car cost: double
Insurance cost : double
Accident cost: int
Insurance cost : car insurance
Milage : int
Model : int (10 years older)
Maker : String
History: String
Main() for testing
Accident class
Job class
Canlnvolved : Car]
date : Date
resPersentage : intI
Job name: String
Jobs cost: double
Van class
sedan class
000000 2000 2000 0 1500 1300 1200
Insurance cost = Driver + city + car
Sport car class
Transcribed Image Text:<<constructor> generation city, increase insurance cost} 3- Generation random { new contracts} people Accident percentage: int GDP-int{12-elements} Jobs: Stringl] (fix} People : insurable] New dav() 4- Generation of accidents 5- Calculate total profit Car abstract class car cost: double Insurance cost : double Accident cost: int Insurance cost : car insurance Milage : int Model : int (10 years older) Maker : String History: String Main() for testing Accident class Job class Canlnvolved : Car] date : Date resPersentage : intI Job name: String Jobs cost: double Van class sedan class 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
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY