Skip to content
Permalink
Browse files
Fixed task
  • Loading branch information
David committed Jan 10, 2019
1 parent dfe4b5e commit ad7d9d1243b4536bc04cb9d423bd7b2690274ec3
Showing 1 changed file with 0 additions and 43 deletions.
@@ -1,43 +0,0 @@
#include <string>

/** Represent an individuals bank account **/
class BankAccount
{
private:
float balance;

public:
static int number; // see the end of this file for the initialisation of number
std::string name;

/** Takes account name as input **/
BankAccount( std::string name )
{
this->name = name;
balance = 0.f;
number = number +1;
}

float get_balance()
{
return balance;
}

void deposit( float amount )
{
balance += amount;
}

void withdraw( float amount )
{
if( amount <= balance )
balance -= amount;
}

/*def transfer(self, other, amount):
if amount <= self.__balance:
self.__balance -= amount
other.__balance += amount*/
};

int BankAccount::number = 0;

0 comments on commit ad7d9d1

Please sign in to comment.