From: Brett L. <wak...@ea...> - 2005-03-01 22:32:04
|
I'm thinking this is probably a good case for creating an abstract= base-class that we can use to derive each of the special cases from while= still inheriting all of the more "standard" abilities. All we need to do is separate out what items are common to all companies,= and which are special cases. I think that some things, like whether a company can own shares of stock= (e.g. 1870), and whether it can't (e.g. 1830), can be covered by a simple= boolean because we'll already be writing the code to manipulate the stocks= elsewhere, so the only thing the company will need is a conditional check= of the boolean before initializing an ArrayList to hold the company's= stocks. The really deviant stuff, like minor company's ability to become major= companies, or the folding in the shares of several companies into a single= company (e.g. 1856's creation of the Canadian National Railway) probably= need specific definitions unto themselves. These are the sorts of things= that, IMO, have no business being in the more generic "default" classes. ---Brett. *********** REPLY SEPARATOR *********** On 3/1/2005 at 8:23 PM Erik Vos using eri...@hc... declared: >But what is then the distinguishing feature of a Minor company? >Minors come with 1 (1835/37, 18EU), 2 (1854) and 5 (1826, 1841) shares. >Some can convert to major companies (1826), others can merge into >new major companies (1835/37, 18EU, 1841) or new minor companies >(1854: "local" (1-share) to "major local railway" (2-share)). > >IMHO, the only fundamental division is between companies that can be= traded >(i.e. shares can be sold: most if not all of the >1-share companies) >and those that can't (most if not all of the 1-share companies). >Perhaps that distinction warrants subclassing, but I'm not sure. > ********** REPLY SEPARATOR END ********** This message sent with 100% recycled electrons. |