ariestamirra

bankk

Apr 12th, 2014
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.49 KB | None | 0 0
  1. public class Bank {
  2.     private Nasabah[] nasabah = new Nasabah[32];
  3.     private int jumlahNasabah;
  4.  
  5.     public Bank() {
  6.         jumlahNasabah=0;
  7.     }
  8.    
  9.     public int getJumlahNasabah() {
  10.         return jumlahNasabah;
  11.     }
  12.  
  13.     public void tambahNasabah(String namaAwal, String namaAkhir){
  14.         nasabah[jumlahNasabah++] = new Nasabah(namaAwal, namaAkhir);                
  15.     }
  16.    
  17.     public Nasabah getNasabah(int index) {
  18.         return nasabah[index];
  19.     }
  20.        
  21. }
Add Comment
Please, Sign In to add comment