import java.util.Vector; // Java container class public class Account { public int ACCOUNT_NO; // primary key public Investor investor; // reference to Investor parent: many to 1 public double CASH = 0; // public visibility: same as record struct public Vector holdings = new Vector(); // list of all holding children : 1 to many public Vector orders = new Vector(); // list of all order children : 1 to many public Vector transactions = new Vector(); // list of all transaction children: 1 to many private static int base_acct = 1000; // static var to auto generate account numbers public Account(Investor investor, double CASH) { this.investor = investor; ACCOUNT_NO = base_acct++; // auto generate this.CASH = CASH; investor.accounts.addElement(this); // add itself to the parent's list of children } public String toString() { return (ACCOUNT_NO + " " + investor.FIRST + " " + investor.LAST + " " + CASH); } }