Commit a8f17bea authored by sam.pople's avatar sam.pople

update

parent e941d94b
...@@ -69,7 +69,7 @@ public class BankAccount { ...@@ -69,7 +69,7 @@ public class BankAccount {
} }
if (negative) { if (negative) {
return "-£ " + string.substring(0, string.length() - 2) + "." + string.substring(string.length() - 2, string.length()); return "-£" + string.substring(0, string.length() - 2) + "." + string.substring(string.length() - 2, string.length());
} else { } else {
return "£" + string.substring(0, string.length() - 2) + "." + string.substring(string.length() - 2, string.length()); return "£" + string.substring(0, string.length() - 2) + "." + string.substring(string.length() - 2, string.length());
} }
...@@ -86,7 +86,8 @@ public class BankAccount { ...@@ -86,7 +86,8 @@ public class BankAccount {
if (this.getBalance() + this.getOverdraft() < amount) { if (this.getBalance() + this.getOverdraft() < amount) {
System.out.println("Not enough funds for a withdrawal \n"); System.out.println("Not enough funds for a withdrawal \n");
return false; return false;
} else { }
else {
this.Balancevalue(this.getBalance() - amount); this.Balancevalue(this.getBalance() - amount);
System.out.println("Withdrawal successful " + this.formatAmount(amount) + "\n"); System.out.println("Withdrawal successful " + this.formatAmount(amount) + "\n");
return true; return true;
......
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