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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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.

<<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
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
// information
Jobs: Jobl]
Age cost: double []
Cars: carf] { cost for each car}
Age : int
License : String
Owned car :car
Driving experiance : int
car insurance cdass
Accident cost: int
Cost per insurance tvoe:
doublel) { full, 3 party }
driver : Driver
Car : Car
insurance type: Stringl] enum
Accidents cost limit: doublel]
Copayment: intl]
insurance type: String
driving citv: City
policy date: Date
insurance cost: double
accidents historv: doublel)
Marital status: String
Gender: String
Job : String
Insurance cost : car insurancel]
Cars : Car[)
Main ()
Create cites
1- While ( days counter
365)
2- Update situation
fincrease people in each
city, increase insurance
cost}
3- Generation random {
new contracts}
City dass
<<constructor>> generation
people
Accident percentage: int
GDP-int12-elerments}
Jobs: Stringl] (fix}
People : insurable[]
New dav()
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 // information Jobs: Jobl] Age cost: double [] Cars: carf] { cost for each car} Age : int License : String Owned car :car Driving experiance : int car insurance cdass Accident cost: int Cost per insurance tvoe: doublel) { full, 3 party } driver : Driver Car : Car insurance type: Stringl] enum Accidents cost limit: doublel] Copayment: intl] insurance type: String driving citv: City policy date: Date insurance cost: double accidents historv: doublel) Marital status: String Gender: String Job : String Insurance cost : car insurancel] Cars : Car[) Main () Create cites 1- While ( days counter 365) 2- Update situation fincrease people in each city, increase insurance cost} 3- Generation random { new contracts} City dass <<constructor>> generation people Accident percentage: int GDP-int12-elerments} Jobs: Stringl] (fix} People : insurable[] New dav() 4- Generation of accidents 5- Calculate total profit Car abstract 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
Random Class and its operations
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education