1. Write a program which gives the insurance premium to be paid each year on a l
ID: 3638546 • Letter: 1
Question
1. Write a program which gives the insurance premium to be paid each year on a life insurance policy under these rules:a. The rate in dollars per $1000 insured changes with age:
i. Age < 40 $10 per $1000 insured
ii. Age between 40 and 59 $15 per $1000 insured
iii. Age 60 and over $20 per $1000 insured
b. If the policy holder is unfit multiply the premium by an extra 1.2
c. If the policy holder smokes multiply the premium by an extra 2.0
d. If unfit and smoker and age 60 or over display a message “Cannot insure”, otherwise display the final value of the premium.
Explanation / Answer
#include #include #include #include #include #include "Insurance.h" #include "Date.h" #include "Client.h" #include "MotorVehicle.h" #include "Life.h" #include "Home.h" using std:: string; using std:: cout; using std:: cin; using std::ios; using std::ofstream; using std::ifstream; using std::cerr; void randomCreate(); void randomWrite(Insurance & , int ); void randomRead(); void randomUpdate(); int main() { system("color 2F"); int position = 0; int choice = 0; MotorVehicle MV; Home H; Life L; Insurance In; Client C; coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.