nawamkihafahd

Untitled

Oct 26th, 2017
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. public class Account
  2. {
  3. private int accountNumber;
  4. private int balance;
  5. public Account(int AccountNumber, int Balance)
  6. {
  7. accountNumber = AccountNumber;
  8. balance = Balance;
  9. }
  10.  
  11. public int getBalance()
  12. {
  13. return balance;
  14. }
  15. public int getAccountNumber()
  16. {
  17. return accountNumber;
  18. }
  19. public void pay(int Cost)
  20. {
  21. balance = balance - Cost;
  22. }
  23. }
Add Comment
Please, Sign In to add comment