How would i incorporate inheritance into this c++ progam
001 #include <iostream> 002 #include<fstream> 003 #include<stdlib.h> 004 #include <cstring> 005 #include <conio.h> 006 #include "Insurance.h" 007 #include "Date.h" 008 #include "Client.h" 009 #include "MotorVehicle.h" 010 #include "Life.h" 011 #include "Home.h" 012 013 using std:: string; 014 using std:: cout; 015 using std:: cin; 016 using std::ios; 017 using std::ofstream; 018 using std::ifstream; 019 using std::cerr; 020 021 void randomCreate(); 022 void randomWrite(Insurance & , int ); 023 void randomRead(); 024 void randomUpdate(); 025 026 027 028 int main() 029 { system("color 2F"); 030 031 int position = 0; 032 int choice = 0; 033 MotorVehicle MV; 034 Home H; 035 Life L; 036 Insurance In; 037 Client C; 038 039 040 041 cout<<".:::::SELECT MENU OPTION:::::.\n\n"; 042 cout<<"\n1. Add A Insurance Policy."; 043 cout<<"\n2. Delete A Insurance Policy."; 044 cout<<"\n3. Edit A Insurance Policy."; 045 cout<<"\n4. Veiw Policy Details."; 046 cout<<"\n5. Exit The Programme."; 047 048 cout<<"\n\nSELECT#"; 049 cin>>choice; 050 051 052 switch(choice){ 053 case 1: 054 system("cls"); 055 randomCreate(); 056 In.Display(); 057 system("cls"); 058 cout<<".:::::PLEASE SELECT INSURANCE TYPE:::::.\n"; 059 cout<<"\n\n1. Home Insurance."; 060 cout<<"\n2. Life Insurance."; 061 cout<<"\n3. Motor Vehicle Insurance."; 062 cout<<"\n0. Exit To Main Menu."; 063 cout<<"\n\nSELECT#"; 064 065 cin>>choice; 066 067 068 switch(choice) 069 { 070 case 1: 071 system("cls"); 07