push
This commit is contained in:
1 parent
fb69c498bf
commit
1b82038a15
2 files changed
+4
-1
No files matched your search
Binary file not shown.
@@ -11,7 +11,10 @@ public abstract class BankAccount {
|
|||||||
balance += amount;
|
balance += amount;
|
||||||
}
|
}
|
||||||
public boolean withdraw(double 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;
|
balance -= amount;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in new issue
Block a user