Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Account {
- private double balance;
- public Account( double initialBalance)
- {
- if (initialBalance > 0.0)
- balance = initialBalance;
- }
- public void debit( double amount)
- {
- balance = balance - amount;
- }
- public double getBalance()
- {
- return balance;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement