From: Stefan F. <ste...@we...> - 2014-04-25 06:57:14
|
Martin & John: some comments about how to answer the questions: There are two classes of companies defined by the Java code: PrivateCompany (inherits from Company and Certificate) => Only pays dividends => Ownership direct by one player PublicCompany (inherits from Company): => Operate trains => Ownership via shares So this implies that currently all operating companies have to be public companies. This explains why the minors in 1835 have to be public companies with one 100% share. Then it is allowed to use "company templates" in CompanyManager.xml to avoid repeating common attributes for companies. So in my opinion 1837 the following templates should be defined: * Mountain Railways (based on PrivateCompany) * Coal Railways (based on PublicCompany with 1 100% share) * Südbahnen (based on PublicCompany with 1 100% share) * K&K Bahnen (based on PublicCompany with 1 100% share) * Ungarische (based on PublicCompany) * Nationals (based on PublicCompany) * Majors (based on PublicCompany) An alternative approach is to combine the second block into a minor template and/or the third block into a major template. However it might be easier to use the more granulate definition e.g. to ease the merger process. Stefan *** Remark: In the long-run it is will be better to separate the concern of operating trains from the structure of ownership. One possible implementation is to define only a single class of Company. At construction time it is possible to assign its type of operation and its ownership structure. This would replace the object/inheritance approach by a entity/composition approach. On 04/20/2014 04:55 PM, Martin Brumm wrote: > Hello, > > in 1837 as some of you may know we have 3-4 different type of Minors > > The true Privates that just pay dividends, The Coal Train Companies > (Kohlebahnen) that are only allowed to run specific trains and > distribute the income 50/50 (1 share), the "Süd",KuK which behave > mostly like the Vorpreussen of 1835. And of course the Hungaries (U1, U3 > with 2 Shares each 25%), U2 (1 Share 50%). > > Whats your preference, suggestion etc. to handle the U1 and U3 ? Treat > them as Majors ? or bring in a new class ? > > Regards > Martin > |