Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #30702

Re: "How do you arrive at classes?"

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Robert Klemme <shortcutter@googlemail.com>
Newsgroups comp.lang.java.programmer
Subject Re: "How do you arrive at classes?"
Date Wed, 14 Jan 2015 08:03:31 +0100
Lines 28
Message-ID <chmim5F33onU1@mid.individual.net> (permalink)
References <classes-20150114054030@ram.dialup.fu-berlin.de>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding quoted-printable
X-Trace individual.net e1fSBnLF9J5YuhvXXiyMlA0i+ybOr4e/zYYHPFHowuheUQndI=
Cancel-Lock sha1:CImvHmeM4wDz++61mojngOpqBpA=
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
In-Reply-To <classes-20150114054030@ram.dialup.fu-berlin.de>
Xref csiph.com comp.lang.java.programmer:30702

Show key headers only | View raw


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


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