Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #30702
| From | Robert Klemme <shortcutter@googlemail.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: "How do you arrive at classes?" |
| Date | 2015-01-14 08:03 +0100 |
| Message-ID | <chmim5F33onU1@mid.individual.net> (permalink) |
| References | <classes-20150114054030@ram.dialup.fu-berlin.de> |
On 14.01.2015 05:57, Stefan Ram wrote: > I tried to answer the question »How do you arrive at > classes?« in the classroom, kind-a stuttering, because > I was not prepared for this question. Now, I am curious: > How would /you/ answer this question? One of the simplest approaches I am aware of is to write down a description of the problem in prose and identify nouns. These are then candidate classes. "The buyer enters the shop and places his order. Each order contains one or more items. Items can be books, DVDs and concert tickets." OK, that is just a simplistic example, but I guess you get the drift. Additionally there are also classes which have more technical reasons. For example to implement the order from above you likely need a list or some similar collection. These are usually harder to "find" I'd say. Luckily a lot of these are part of the standard library. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread
Re: "How do you arrive at classes?" Robert Klemme <shortcutter@googlemail.com> - 2015-01-14 08:03 +0100 Re: "How do you arrive at classes?" Martin Gregorie <martin@address-in-sig.invalid> - 2015-01-14 14:00 +0000
csiph-web