Question: undefined Question 3 (50 points) Consider the following program specification and its implementation: Program Specification: When asked for an insurance quotation, an auto insurance company
undefined
Question 3 (50 points) Consider the following program specification and its implementation: Program Specification: When asked for an insurance quotation, an auto insurance company looks up the base rate of insuring a specific make, model, and year of car. It then multiplies the base rate by percentages according to the business rules below to calculate the premium for a customer. Drivers over 55 years of age pay 90% of the base rate. Drivers who are male and under 25 years of age pay 150% of the base rate. Anyone who uses the car for business pays a premium of 120% of what they would pay for personal use only. Code: (1) float Quotation (float Base, int age, Boolean Male, Boolean Business) { (2) float Premium = Base; (3) IF (age>55) { Premium *= 0.9;} (5) else { (6) If ((age 55) { Premium *= 0.9;} (5) else { (6) If ((age
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
