Question: Consider the class specification (interface) for the class insurance Polacy below class Insurance Policy public Insurance Policy). Insurance policy tant pnt, string pholder, double arate).

 Consider the class specification (interface) for the class insurance Polacy below

Consider the class specification (interface) for the class insurance Polacy below class Insurance Policy public Insurance Policy). Insurance policy tant pnt, string pholder, double arate). void snowPolicy fostren & Out)const. void set Policyant pNe, string pholder, double arate). unt get_pcoast. string get_phoider () const. double get_aRate() const. private int policyNr. strang policyholder. double annuaiRate. 51 Defne a new class Car Insurance that inherits the functionality of the ciass Insurance policy The class Carins arance has an additional member vanable, excess. Class Insurance policy also has member functions, get_excess() and set_excess to return member vanable excess and update member vanable excess respectively The class Car Insurance should overnde function showPolicy) in order to display the member vanables of Carinsurance and function set Policy) in order to update the member variables of Car Insurance Provide only the interface of class Car Insurance in terms of a header file The header file should contain compiler directives to prevent multiple definitions Assume that the interface of class Insurance policy contained in an interface file called Insurance policy h (8) 52 implement the overloaded constructor for the class Car Insurance by invoking the base class constructor (3) 53 Consider the following implementation void Car Insurance set Policy ant pn, string pholder, double aRate, double evalue) 1 policynr - PNE policyholder - polder, annual Rate - aRate. excess - eValue 1 (2) Explain why set Policy() is not a legal definition in the derived Car Insurance How should this problem be resolved? 54 From your implementation of class Car Insurance give an example of 541 overloading a function, and 542 redefining a function (1) (1)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!