Commit 70f42e14 authored by a-j.towse's avatar a-j.towse

Final commit

parent a911463c
......@@ -2,11 +2,13 @@ public class BankAccount {
int accountNumber;
String name;
double balance;
double overdraft;
public BankAccount(){
accountNumber = 0;
name = "N/A";
balance = 0;
overdraft = 0;
}
......@@ -22,10 +24,9 @@ public class BankAccount {
}
public void withdrawal(double outAmount){
if (outAmount <= balance || outAmount > 0){
if (outAmount <= balance || outAmount > 0 - overdraft){
balance -= outAmount;
}
}
public void bankFees(){
......@@ -39,7 +40,7 @@ public class BankAccount {
System.out.println(balance);
}
public void addOverdraft(double overdraft){
public void addOverdraft(double over){
double overdraft = over;
}
}
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