Advertisement
mnaufaldillah

dataNasabah ETS-2

Nov 24th, 2020
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. /**
  2.  * Class dataNasabah menyimpan pin dan saldo nasabah
  3.  *
  4.  * @author Muhammad Naufaldillah
  5.  * @version 24 November 2020
  6.  */
  7. public class dataNasabah
  8. {
  9.     private String pin = "122345";
  10.     private int balance = 3000000;
  11.    
  12.     public dataNasabah()
  13.     {
  14.        
  15.     }
  16.    
  17.     public String getPin()
  18.     {
  19.         return this.pin;
  20.     }
  21.    
  22.     public int getBalance()
  23.     {
  24.         return this.balance;
  25.     }
  26.    
  27.     public void depositBalance(int amount)
  28.     {
  29.         balance = balance + amount;
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement