Write a C++ application that implements the following class(es) as per business requirements…
Write a C++ application that implements the following class(es) as per business requirements mentioned below: Create an Insurance class (Insurance.h) that has the following data members (choose appropriate data type for them):
a) Insurance number, customer name, start date of policy
b) Define get methods and set methods along with validations for all the above data members variables.
c) Insurance class should have defined two overloaded constructors:
a. One for initializing all the data members data members to their default values
b. Second for initializing only Insurance number, customer name, start date of policy and address
d) Declare a public method double Monthly Payments() which is used for calculating monthly Insurance installment amount.
e) Define a method Display Data() to display the values Create following two subclasses of Insurance class:
a) Life Insurance (LifeInsurance.cpp)
b) Vehicle Insurance (Vehicle Insurance .h) For Life Insurance class, implement the following:
a) Define a member variable – age of the person. Minimum is 1 and Max is 100 and another Boolean variable – smoker.
b) Define getters and setters for the above and validations.
c) A constructor for initializing all the data members/variables with appropriate values.
d) Defining/Overriding the method – double Monthly Payments () which calculates monthly insurance installment.
e) Business requirements for calculating the yearly insurance – if the person is = 2005.
b) Define another Boolean data members variable – green Vehicle. (yes – means – electric, no means gasoline)
c) Constructor for initializing all the data members variables
d) Defining/Overriding the method – double Monthly Payments () which calculates monthly vehicle insurance installment
e) Business requirements for calculating the yearly insurance – if the vehicle is <= 5, then yearly insurance amount is $3000.00. if between 6 and 10, then 1.5 times and if above 10, then it two times of the amount. And if the vehicle is not green, then add $300.00 as environment fee to yearly insurance amount but if a vehicle is green, then give 10% discount on yearly insurance amount. You need to add GST also which is 13%.
f) You need to define/override Display Data () method to display the object’s data. Create a test class – Insurance Test (InsuranceTest.cpp) which tests above classes by at least creating two objects each of the Life Insurance and Vehicle Insurance classes and then processing them normally and polymorphically.
Write a C++ console application which does the following: This is about operator overloading.
a) Define a class -Product (Product.h) having data members – ID, name and price.
b) Defining the appropriate get methods and set methods
c) Define an appropriate constructor which initializes all the data members. Implement validations ensuring that value of the price is positive and greater than zero.
d) Overload operator ‘ > ‘ in the class which compares two objects and returns true or false(greater than)
e) In the test class (ProductTest.cpp), you need to create three objects and print who has the highest price and display it name.