Should I instantiate a collection or inherit from collection?
问题 I've asked myself this question a number of times when creating classes, particularly those involving collections, but I've never come up with a satisfactory answer. It's a OOP design question. For example, in a checkbook register program say I have a class of BankAccount . BankAccounts contain data involving the Name of the account, the Type of account (enum of Checking, Saving,...), and other data, but most importantly is a collection of the Adjustment s (deposits or withdrawals) in the