Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I understand this somewhat but can someone help explain the steps you took into

ID: 3723433 • Letter: I

Question

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 umber of Violations Risk Code Risk Tvpe or More igh oderate oderate 0 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 ge Under 25 4 or more 5 or older4 or more umber of Tickets Risk CodePrice 480 410

Explanation / Answer

Since there are static tables in this problem, we can capture them in an enum data type. One enum for each table. So, RiskAnalyzer enum captures the first table which has the matrix for the risk code & risk type based on traffic violation count. While, RiskQuote enum captures the second table which has the matrix for the insurance price quote based on the age and the risk type.

Sample outputs have been posted below the source code -

/**********************************************************/

Sample outputs -

Enter the name of the customer:
Abel
Enter the age of the customer:
18
Enter the number of traffic violations by the customer:
2
Abel, as a Moderate risk driver, your insurance will cost 405.0

Enter the name of the customer:
Bony
Enter the age of the customer:
35
Enter the number of traffic violations by the customer:
1
Bony, as a Low risk driver, your insurance will cost 315.0

Enter the name of the customer:
Calvin
Enter the age of the customer:
15
Enter the number of traffic violations by the customer:
0
Invalid Entry

Enter the name of the customer:
Delphi
Enter the age of the customer:
106
Enter the number of traffic violations by the customer:
5
Invalid Entry