Re: basic q about sequence diagrams

From: Karl Hungus (nnnnndddddd_at_hotmail.com)
Date: 03/17/04


Date: Tue, 16 Mar 2004 23:47:37 GMT


> > A user wants to know how many, so enquires from the system, by sending
> > a 'how many passengers do you have?' message to the car.
> >
> > so the answer is:
> > [system] ------getPassengers----->[car]
>
> Taken literally, that would not be a good practice. If all the client
> cares about is the number of passengers, it doesn't need the passengers
> themselves to determine that. It should ask for only what it does need,
> which is a count. Which is why giving [Car] a public responsibility for
> knowing how many passengers it has is reasonable.

in my original example, I just wanted to return a collection of passengers.
Assuming the system manipulates some attributes of the passengers outside
the context of car, I would think its ok (to do that in system). I agree the
car should keep count of its passengers.

Another more general question is, do you feel that sequence diagrams should
avoid method-like names in the messages? or is this another example of
conceptual vs specification vs implementation diagrams.

TIA



Relevant Pages

  • Re: Retrieving unnecessary data
    ... Pretend I am modeling a Car. ... Typically that would be done with a collection class and would have a reference to the collection class. ... If no one but ever needs to know about passengers, then that reference could be private or the collection class instance could be an embedded object in 's implementation. ... If the solution needs both then an interface method would provide that. ...
    (comp.object)
  • Re: Mass Transit
    ... What about passengers, then (since I am almost always a passenger ... a car, bus, train, plane, etc., is very different from driving one. ... Yet a passenger in a car can do useful things to help the driver, ... show how you will route transit to where presently non served by any ...
    (rec.arts.sf.fandom)
  • Re: basic q about sequence diagrams
    ... and the Client needs to collaborate with the Car's Passengers. ... Client sends a message directly to each Passenger. ... "Collection* R2" in [Car] that only a code generator could love. ... That seems like a reasonable responsibility of. ...
    (comp.object)
  • Re: Minibus hire company backs out of arrangement.
    ... I didn't think I was proposing to use the vehicle for hire or reward. ... people who use their car to take ... Your policy covers you for carrying passengers for social or similar ...
    (uk.legal)
  • Re: Aylesbury Vale Parkway
    ... steelwork for the station building is erected though and it looks like ... north of Aylesbury and indeed the northern suburbs of the town itself. ... Free car parking for the first year should act as a suitable carrot. ... passengers on train with me towards London. ...
    (uk.railway)