#include #include #include #include class Account {private:char c_name[25]; int acc_no; char type[7]; public:void read(int); void display(); }; class Sav_acc:public Account {private:float balance; float debit; float deposit; float interest; public:void update(); }; class Cur_acc:public Account {private:float balance; int pages_ch; float debit; float deposit; public:void update_cur(); }; void Account::read(int x) {int i=0,j=0; char sav[7]="savings",cur[7]="current"; clrscr(); cout<<"\nEnter your account number:"; cin>>acc_no; cout<<"\nEnter your name:"; cin>>c_name; if(x==1) {for(i=0;i<7;i++) {type[i]=sav[i]; } } else {for(j=0;j<7;j++) {type[j]=cur[j]; } } } void Sav_acc::update() {int amt; cout<<"\n enter the balance:"; cin>>balance; cout<<"\n Enter the amount of money to be withdrawn:"; cin>>debit; cout<<"\n The balance after the withdrawal is:"; balance=balance-debit; cout<>deposit; cout<<"\n The amount after deposit is:"; balance=balance+deposit; cout<>deposit; cout<<"\n The amount after deposit is:"; balance=balance+deposit; cout<>debit; cout<<"\n The balance after the withdrawal is:"; balance=balance-debit; cout<>ch; if(ch=='y') {cout<<"\n Enter the number of pages to be issued of the cheque book:"; cin>>pages_ch; cout<<"\n the book will be issued to you after two days:"; c=1; } else {if(ch=='n') {c=1;} else {cout<<"\n sorry you have entered wrong choice:"; getch(); } } } } void Account::display() {cout<<"\nThe account number is:"<>c; switch(c) {case 1:Sav_acc a; a.read(c); a.update(); a.display(); getch(); break; case 2:Cur_acc b; b.read(c); b.update_cur(); b.display(); getch(); break; case 3:i=1; cout<<"\n thanks for using our services:"; getch(); break; default:cout<<"\n sorry you have entered wrong choice enter again:"; getch(); } } }