SHARE
TWEET

Untitled

a guest Oct 21st, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  private int id;
  2.     private double balance;
  3.     private static double interestRate = DEFAULT_INTEREST_RATE;
  4.     private static int bankAccount = 1;
  5.     ArrayList idUsers = new ArrayList();
  6.     BankAccount(){
  7.         this.id = bankAccount++;
  8.     }
  9.     static void setInterestRate(double interestRate)
  10.     {
  11.         BankAccount.interestRate = interestRate;
  12.     }
  13.     void deposit(double amount)
  14.     {
  15.         this.balance += amount;
  16.     }
  17.     double getInterest (int years)
  18.     {
  19.         return BankAccount.interestRate * years * this.balance;
  20.     }
  21.     void setIdUsers()
  22.     {
  23.         this.idUsers.add("Id"+ id);
  24.     }
  25.  
  26.  
  27.  
  28.  
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top