Oop Project
Oop Project
#include<stdlib.h>
using namespace std;
class bank
{
public:
char customerName[20];
int mobileNo,aadharNo;
bank()
{
cout<<"\nEnter name of customer : ";
cin>>customerName;
cout<<"\nEnter aadhar no. : ";
cin>>aadharNo;
cout<<"\nEnter mobile no. : ";
cin>>mobileNo;
}
virtual void transaction()=0;
};
int main()
{
int input;
int opt;
jump:
do
{
cout<<"\nIn which bank you wish to open account?";
cout<<"\n1. SBI.\n2. BOI.";
cout<<"\nEnter your choice : ";
cin>>input;
switch(input)
{
case 1:
{
sbi s;
cout<<"\nAccount created in SBI successfully.";
cout<<"\nYour account no. is : "<<s.sbiacc;
s.transaction();
goto jump;
}
case 2:
{
boi b;
cout<<"\nAccount created in BOI successfully.";
cout<<"\nYour account no. is : "<<b.boiacc;
b.transaction();
goto jump;
}
case 3:
{
exit(0);
break;
}
}
}while(input<4);
return 0;
}