Guest User

Untitled

a guest
Apr 3rd, 2017
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1.  
  2. public class Account
  3. {
  4. private double balance;
  5.  
  6. public Account (double initialBalance)
  7. {
  8. if (initialBalance > 0.0)
  9. balance = initialBalance;
  10. }
  11.  
  12. public void credit (double amount)
  13. {
  14. balance = balance + amount;
  15. }
  16.  
  17. public double getBalance()
  18. {
  19. return balance;
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment