Guest User

Untitled

a guest
Feb 21st, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. package matador_BusinessLogic;
  2.  
  3. public class Konto {
  4.  
  5. public static void main (String[] args)
  6. {
  7. int konto;
  8.  
  9. Konto Spiller_konto_1 = new Konto ("Spiller 1", 10000);
  10.  
  11.  
  12.  
  13. private long Kontonummer;
  14. private double balance;
  15. private String Spiller;
  16.  
  17. public Konto (String owner, long konto, double initial)
  18. {
  19. Spiller = owner;
  20. Kontonummer = konto;
  21. balance = initial;
  22. }
  23.  
  24.  
  25. public double deposit (double amount)
  26. {
  27. balance = balance + amount;
  28. return balance;
  29. }
  30. public double withdraw (double amount)
  31. {
  32. balance = balance - amount;
  33. return balance;
  34. }
  35.  
  36.  
  37. }
Add Comment
Please, Sign In to add comment