I am in the process of making a bank account class. I need to put a copy constructor to compare the checking and savings account. Also I need to learn how to insert the checking and savings accounts. I need an assignment operator to assign the checking account to the saving. Last but not least I need a overloaded operator to find the total of the saving and checking account. Any help appreciated whether you know one thing or two =)
# include<iostream>
void account::withdraw(int amount)
void account::deposit(int amount)
int account::balance(void)
{
public:
static int transactions;
Account();
Account(const Account &right);// copy cstr
~Account();
void withdraw(int);//Take from account
void deposit(int);// Put into account
int balance()const;/ / Read the balance
Account& operator+(const Account &);
Account& operator=(const Account &);
virtual void account_update(int)=0;
private:
int bal;
};
ostream &operator<<(ostream &, const Account&);
{
cout<<"
1. Deposit
2. Withdraw
3. Balance
cin>>choice;
switch(choice)
{
cout<<"
break;
case 1 : obj.deposit();
break;
case 2: obj.withdraw();
break;
case 3 :obj.balance();
break;
}
void deposit(int)
{
cout <<" Deposit ";
cout<<" Amount being deposited ";
cin>>more;
balance+=more;
}
void withdraw(int)
{
cout<<"Withdrawal ";
cout<<" Amount being withdrawed : ";
cin>>amt;
balance-=amt;
}
int balance()const;
{
cout<< " Account Balance"
cout<<" Your Balance Is"
balance= totl
}