package banking4;
public class Bank {
private Customer [] customers;//用于存放客户
private int numerOfCustomres;//记录客户的个数
public Bank() {
customers = new Customer[5];
}
//添加一个customer 到数组中
public void addCustomer(String f,String l) {
Customer cust = new Customer(f,l);
customers[numerOfCustomres] = cust;
numerOfCustomres++;
}
//获取Customer的个数
public int getNumOfCustomers() {
return numerOfCustomres;
}
//返回指定索引位置的customer
public Customer getCustomer(int index) {
return customers[index];
}
}