From: Daniel T. on 11 Aug 2010 22:59
Victor Bazarov <v.bazarov(a)comcast.invalid> wrote:
> On 8/11/2010 1:45 AM, Srinu wrote:
> > This is a unfortunate-problem of everyday life to every programmers.
> > What are the simple guidelines to choose my classes for my problem?
> There aren't any.
I agree with Victor. Anybody who could explain something like this in
the standard length of a newsgroup post doesn't know what he's talking
On top of that, there are many different reasons to make a class (and
different languages weight the reasons differently.)
Object-Oriented Design Heuristics -- Arthur Riel
Object-Oriented Software Construction -- Bertrand Meyer
Object-Oriented Analysis and Design with Applications -- Grady Booch
> > We would like to gather some thumb-rules from our own experience.
> > This question arose, when I encounter two very different OOP approach.
> > 1. For every word uttered in the requirement, we can write a class.
> > 2. Most restrictive approach where it is forbidden to add one more
> > class.
> > Obviously, the above two approaches are not correct, for they
> > represent two extremes.
> > Question is now, where shall I stop adding more classes? What are the
> > simple guidelines/thumb-rules to choose classes for my problem?
> > Here interest is not on any particular type of problem. Guidelines
> > need be very generic, applicable to all problems that can better be
> > solved with OO technology.
> > I will be happy to listen from your own experience.
> From experience: ask in comp.object.
Yes, this is very much a comp.object question.
Prev: How to choose classes in object oriented design?