Path: csiph.com!usenet.pasdenom.info!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: proper use of .java files (layout) Date: Sun, 16 Dec 2012 16:43:50 +0100 Lines: 24 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net CjB6cr0Ps8MZ+uBGr/BzSwwRjLqwVSwSpJilMecvCAfTmVTZHNR+7ElL0cACGH5Nw= Cancel-Lock: sha1:JPe6SdZVW6sjVlI73zD3yKFzo5Y= User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:20379 On 16.12.2012 16:38, infinitum3d@hotmail.com wrote: > I'm trying to figure out the best way to layout a java program. > Should I put each object into its own .java file? If I'm making a > card game, that would be 52 .java files. Is that crazy? Normal? Crazy. > Or should I separate them by suit and just have 4 .java files? Or by > value so there are 13 .java files? You better had just one class for Card which has different properties. Which properties you need depends of course on the card at hand and on the application. Sometimes it may make sense to make Card an interface and have different implementing classes. But that all depends on the application that is being written. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/