Commit c1191516 authored by a-j.towse's avatar a-j.towse

first commit

parents
public class BankAccount {
int accountNumber;
String name;
double balance;
public BankAccount(){
accountNumber = 0;
name = "N/A";
balance = 0;
}
public BankAccount(int accnum, String accname, double accbalance){
accountNumber = accnum;
name = accname;
balance = accbalance;
}
public void deposit(double inAmount){
balance += inAmount;
}
public void withdrawal(double outAmount){
if (outAmount <= balance || outAmount > 0){
balance -= outAmount;
}
}
public void bankFees(){
double fee = balance * 0.05;
balance -= fee;
}
public void display(){
System.out.println(accountNumber);
System.out.println(name);
System.out.println(balance);
}
public void addOverdraft(double overdraft){
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment