import java.util.Vector; // Java container class public class Holding { public Account account; // part of primary key, but not a string public Stock stock; // part of primary key, reference to parent public int QTY; public Holding(Account account, Stock stock, int QTY) { this.account = account; this.stock = stock; this.QTY = QTY; account.holdings.addElement(this); // add itself to the parent's list of children } public String toString() { return (account.ACCOUNT_NO + " " + stock.SYM + " " + QTY); // access primary key string } public void remove() { account.holdings.removeElement(this); // remove itself when QTY is sold off } }