This commit is contained in:
Fastium 2022-05-04 08:29:46 +02:00
parent fb69c498bf
commit 1b82038a15
2 changed files with 4 additions and 1 deletions

Binary file not shown.

View File

@ -11,7 +11,10 @@ public abstract class BankAccount {
balance += amount;
}
public boolean withdraw(double amount){
if(balance<amount) return false;
if(balance<amount){
System.out.println("Problem : cannot withdraw that amount");
return false;
}
balance -= amount;
return true;