public class BrokerageAccount {
  String accountNumber;
  Customer customer;
  Map investments;

  // pominęliśmy konstruktory itp.

  public Customer getCustomer() {
    return customer;
  }
  public Investment getInvestment(String stockSymbol) {
    return (Investment)investments.get(stockSymbol);
  }
}
