// to represent a list of bank accounts class AccountList{ } // Represents a List of Accounts... interface ILoA{ } // Represents an empty List of Accounts... class MtLoA implements ILoA{ // Nothing to be done for MtLoA MtLoA(){} } // Represents a non-empty List of Accounts... class ConsLoA implements ILoA{ Account first; ILoA rest; ConsLoA(Account first, ILoA rest){ this.first = first; this.rest = rest; } /* TEMPLATE FIELDS: ... this.first ... --- Account ... this.rest ... --- ILoA METHODS: METHODS FOR FIELDS: */ }