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


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

Re: "How do you arrive at classes?"

From Martin Gregorie <martin@address-in-sig.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: "How do you arrive at classes?"
Date 2015-01-14 14:00 +0000
Organization A noiseless patient Spider
Message-ID <m95sqe$45o$1@dont-email.me> (permalink)
References <classes-20150114054030@ram.dialup.fu-berlin.de> <chmim5F33onU1@mid.individual.net>

Show all headers | View raw


On Wed, 14 Jan 2015 08:03:31 +0100, Robert Klemme wrote:

> 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.
>
I do something similar but with a fairly long exposure to database design 
as well as programming, I tend to start by drawing an Entity Relationship 
Diagram that describes the data structure needed to underpin the problem. 
Then the entities become the main data-related classes with closely 
related operations as their methods. The various relationships become 
Collections (TreeMaps of key sequence is important, HashMap where it 
isn't and Lists to support other types of ordering such as arrival 
sequence.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

Back to comp.lang.java.programmer | Previous | Next — Previous 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