I have a small yet non trivial doubt. My assignment states "Public Method Names referenced in other UML diagrams should be provided for class diagram".
Now my deliema is Do i have to include 1) Just the method name OR 2) Method name and its Signature.
submitShippngRequest(Address, int) :void
The whole signature is making the class diagram pretty Huge/wide. Imagine that in 16-20 classes. And i dont know if haveing an int in signature communicates that its OrderNumber that shoud be passed as an int.
Any response from my expericed colleagues is much appreciated.
SCJP 5 91%
SCEA Part 1 93%
I wouldn't get too flustered about the size of the diagram. As for encapsulating two parameters in a request object I think that's a little excessive (unless you envisage a change in the signature and you want to encapsulate that change in the request object). Methods with five or more parameters, however, should start alarm bells ringing, but refactoring based solely on the aesthetics of your diagram seems silly. In case you're tempted, I also think abbreviating identifiers is a big mistake. After all, in many cases the code is the documentation.
Regardless, a class diagram with only 16-20 classes is never going to be overly complex. What I would say is that whatever approach you take be consistent - don't mix and match.
SCJP, SCWCD, SCBCD, SCEA 5
J J Wright
posted 9 years ago
submitShippngRequest() OR submitShippngRequest(Address, int) :void
I think it's OK to only list the types of objects that are passed as parameters. However, as you say, primitives are a different matter so in the case of your orderNumber param I would provide a name, i.e.