Created
October 17, 2012 02:38
-
-
Save anonymous/3903417 to your computer and use it in GitHub Desktop.
Bank account
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class BankAccount { | |
private double balance; | |
private int nodmonth; | |
private int nowithdrawals; | |
private double deposit; | |
BankAccount() | |
{ | |
balance=0; | |
nodmonth=0; | |
nowithdrawals=0; | |
deposit = 0; | |
} | |
public void Balance(double b) | |
{ | |
balance=b; | |
} | |
public void Deposit(double d) | |
{ | |
balance=balance+d; | |
deposit = d; | |
nodmonth++; | |
} | |
public void Withdrawal(double w) | |
{ | |
balance=balance-w; | |
nowithdrawals++; | |
} | |
public double getBalance() | |
{ | |
return balance; | |
} | |
public int getNodmonth() | |
{ | |
return nodmonth; | |
} | |
public double getDeposit() | |
{ | |
return deposit; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment