Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I understand this somewhat but can someone help explain the steps you took into doing this problem as well when you do the problem. You

I understand this somewhat but can someone help explain the steps you took into doing this problem as well when you do the problem.

You have been tasked to construct a program that will prepare automobile liability insurance estimates for customers. The input consists of:

The name of the customer

The age of the customer

The number of traffic violations

Based on this information you will determine their status as a driver, following these guidelines:

Number of Violations

Risk Code

Risk Type

4 or More

1

High

3

2

Moderate

2

2

Moderate

1

3

Low

0

4

No

More than 4 tickets indicate a Code 1 driver, which is High Risk. Code 2 Drivers who have either 2 or 3 tickets, are considered Moderate Risk drivers. Any driver with one ticket is deemed Code 3, and considered Low Risk. Drivers without any tickets are considered Code 4, which is No Risk. Based upon this classification you can then give them the appropriate quote.

Pricing of Insurance:

Age

Number of Tickets

Risk Code

Price

Under 25

4 or more

1

$480.00

25 or older

4 or more

1

$410.00

Under 25

3

2

$450.00

25 or older

3

2

$390.00

Under 25

2

2

$405.00

25 or older

2

2

$365.00

Under 25

1

3

$380.00

25 or older

1

3

$315.00

Under 25

0

4

$325.00

25 or older

0

4

$275.00

Sample output line follows (Items underlined are variable values):

Customer Name, as a ---- risk driver, your insurance will cost -----.

You are to account for invalid input. Drivers must be between the ages of 16 and 105. Number of traffic violations cannot be less than 0. Display only the message Invalid Entry in either case.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Datalog Engines In Databases

Authors: Bas Ketsman ,Paraschos Koutris

1st Edition

1638280428, 978-1638280422

More Books

Students also viewed these Databases questions

Question

=+1. Who is your key public?

Answered: 1 week ago