Problem

Complete the following tasks:a. Create a class named InsurancePolicy for a life insurance...

Complete the following tasks:

a. Create a class named InsurancePolicy for a life insurance company. Data members include a policy number, last name of the policy holder, value of the policy, and annual premium. Member functions include overloaded insertion and extraction operators. Continue to prompt the user for data for InsurancePolicy objects and write each InsurancePolicy to a data file until the end-of-file is entered. Save the file as CreateInsPolicyFile.cpp.


b. Write a program that reads the InsurancePolicy file and displays InsurancePolicy data on the screen. Save the file as DisplayInsPolicyData.cpp.


c. Add a function to the InsurancePolicy class that returns the policy value. Write a program that prompts the user for a minimum policy amount. Read the InsurancePolicy file and display only those records for which the policy value equals or exceeds the entered amount. Save the file as DisplaySelectedPolicyData.cpp.


d. Add a function to the InsurancePolicy class that displays policy information in a formatted line suitable for a report, including appropriately spaced columns and dollar signs and decimal points for the monetary values. Modify the DisplaySelectedPolicyData application created in part c of this exercise so that the selected records are displayed using the report-creating function. Save the file as DisplaySelectedPolicyDataReport.cpp.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT