Re: Let's put this to rest
- From: AndyW <foo_@xxxxxxxxxxxxxxxx>
- Date: Fri, 16 Jun 2006 15:27:52 +1200
On Thu, 15 Jun 2006 16:55:12 +0100, "S Perryman" <a@xxxxx> wrote:
"H. S. Lahman" <h.lahman@xxxxxxxxxxx> wrote in messageUm.. Yes, I understood it. A stack is simply a collection class,
news:WXekg.4135$n93.1619@xxxxxxxxxxx
Responding to Perryman...
You are asking for an OOP class definition, not an OOA model. Stick to
the original challenge and find an example in either book that you can
demonstrate would be done differently by "most people" because of some
fundamental difference in design methodology.
1. Already done. In a few seconds. No problem whatsoever.
So what I have is an OOA model for a stack.
A stack is almost always an implementation artifact for an ordered
collection. Whether one needs an ordered collection or not and how that
ordering should be done, if needed, depends on what the problem being
solved is, which you have not specified.
But IF a stack was needed to solve the problem, it would usually be
represented in the OOA model as:
1 R1 <<ordered>> *
[A] ---------------------- [B]
IOW, <<ordered>> and 1:* (or *:*) is all one needs to know at the OOA
level of abstraction. Deciding whether one needs stacks, linked lists,
B-Trees or whatever for relationship collection classes is a tactical OOP
prerogative. [Note the 'usually' in the first sentence. There are
exceptions that depend on particular problem contexts that haven't been
defined here.]
It is exactly this sort of open-ended discussion at the wrong level of
abstraction with requirements that are a moving target that I sought to
avoid in the challenge. So I am not going to waste any more time pursuing
this further.
1. Where is the definition of push ?? top ?? pop ??
All the things in the *specification* for stack that you were given.
2. Does anyone on comp.object think that this :
1 R1 <<ordered>> *
[A] ---------------------- [B]
looks like UML specification for any stack entity that they have ever seen
or used in a software system ??
usually an ordered list.
Adding pop/push etc is a design thing, not an analysis thing. Thats
the rub. While the notation is the same, the thinking and conceptual
level is not.
One could break down that analysis further in order to find out what
type of stack actually was used, but that really comes down to the
level of detail required. More often than not, it probably doesnt
need to be known (but it really depends on the context of the domain
being used).
.
- Follow-Ups:
- Re: Let's put this to rest
- From: Robert Martin
- Re: Let's put this to rest
- From: S Perryman
- Re: Let's put this to rest
- From: Daniel Parker
- Re: Let's put this to rest
- From: Laurent Bossavit
- Re: Let's put this to rest
- References:
- Let's put this to rest
- From: H. S. Lahman
- Re: Let's put this to rest
- From: S Perryman
- Re: Let's put this to rest
- From: H. S. Lahman
- Re: Let's put this to rest
- From: S Perryman
- Re: Let's put this to rest
- From: H. S. Lahman
- Re: Let's put this to rest
- From: S Perryman
- Re: Let's put this to rest
- From: H. S. Lahman
- Re: Let's put this to rest
- From: S Perryman
- Let's put this to rest
- Prev by Date: Re: Let's put this to rest
- Next by Date: Re: OO and RDB war : in the advent of MRAM
- Previous by thread: Re: Let's put this to rest
- Next by thread: Re: Let's put this to rest
- Index(es):
Relevant Pages
|