You are on page 1of 3

#include<iostream>

#include<string>
using namespace std;
class BankAccount
{
long int Account_ID;
string Account_holdername;
double Bank_balance;
string account_type;
string Bank_name;
string DOB;
long int contact_number;
public:
BankAccount()
{
Bank_name = ("Muslim bank");

Account_holdername = ("Ammad khilji");


account_type = ("govt");
Account_ID = (0515506231);
Bank_balance = (157500);
DOB = ("15-12-1996");
contact_number = (0332);
}
~BankAccount()
{
cout << "You have called the distructor" << endl;
}

void view_accountdetail()
{
cout << "account detail=" << endl << endl;
cout << "account_id=" << Account_ID << endl;
cout << "account_holdername" << Account_holdername << endl;
cout << "bank_name=" << Bank_name << endl;
cout << "bank_type=" << account_type << endl;
cout << "date of birth=" << DOB << endl;
cout << "CONTACT NUMBER=" << contact_number << endl;
}
void current_bankbalance()
{
cout << "current bank balance" << endl;
cout << Bank_balance;
}
void add_cash()
{
system("cls");
cout << "Your Total Balance is:" << Bank_balance << endl;
cout << "---------------------" << endl;
cout << "Enter amount to add cash:";
double amount;
cin >> amount;
Bank_balance += amount;
cout << "Your Total Balance is:" << Bank_balance << endl;
}
void withdraw_cash()
{
system("cls");
cout << "Your current Balance is:" << Bank_balance;
cout << "" << endl;
double amount;
cout << "Please Enter withdraw Amount" << endl;
cin >> amount;
if(amount > Bank_balance)
{
cout << "insufficient funds warning" << endl;
}
else
{
amount += 3.81;
}

long int id;


float tax = 3.89;
float remaning_balance;
int transaction_time;
cout << "enter first 6 digits";

}
void display()
{
system("cls");
cout << "Information" << endl;
cout << "" << endl;
cout << "account_ID" << Account_ID << endl;
cout << "account holdername" << Account_holdername << endl;
cout << "Bank_Name:" << Bank_name << endl;

cout << "Account_Type:" << account_type << endl;


cout << "Total Balance is:" << Bank_balance << " RS" << endl;

}
};
int main()
{
int a;
BankAccount b1;

system("cls");
cout << "Bank Account Information" << endl;
cout << "------------------------" << endl;
cout << "1>.view_accountdetail" << endl;
cout << "2>.current_bankbalance" << endl;
cout << "3>. add_cash" << endl;
cout << "4>. Withdraw An Amount" << endl;
cout << "5>.Display" << endl;
cout << "6> .delete bank_account" << endl;
cout << "7>.please enter exit" << endl;
cout << "Enter Your Choice:";
cin >> a;
switch (a)
{
case 1:
b1.view_accountdetail();
break;
case 2:
b1.current_bankbalance();
break;
case 3:
b1.add_cash();
break;
case 4:
b1.withdraw_cash();
break;
case 5:
b1.display();
break;
case 6:
b1.~BankAccount();
break;
case 7:
exit(0);
break;
default:
cout << "Please Enter The Correct Choice!..";
}
system("pause");
return 0;
}

You might also like