Win a copy of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

defualt multiplicity is 1 or 1..many?

 
Hooplehead
Posts: 136
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

What is the default multiplicity? E.g.: if none is given? In my searches through the forums and the Internet I have found both "1 and only 1" and "1 to many".

I am particulary interested in the official Sun opinion as I am working on certifications.

Thanks,

Stu

[ July 28, 2006: Message edited by: Stu Thompson ]
[ July 28, 2006: Message edited by: Stu Thompson ]
 
author
Posts: 608
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the context? Are you talking about the UML? About something else?

- Scott
 
Stu Thompson
Hooplehead
Posts: 136
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
UML.
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There isn't a real default. Multiplicities may be intentionally suppressed in one diagram but are usually specified in another (way).

The Unified Modeling Language Reference Manual 2e (2004) (amazon US)
p. 467


multiplicity:
...
Discussion:
...
The multiplicity may be suppressed on a diagram, but it exists in the underlying model. In a finished model, there is no meaning to an "unspecified" multiplicity. Not knowing the multiplicity is no different from saying that it is many, because in the absence of any knowledge, the cardinality might take any value, which is just the meaning of many.
See unspecified value.



p.667


unspecified value:
...
Discussion:
...
For example, multiplicity cannot be unknown; it must have some value. A lack of any knowledge is tantamount to a multiplicity of many. The semantics of UML therefore do not allow or deal with the absence of values or unspecified values.
...
There is another sense in which "unspecified" is a useful part of an unfinished model. It has the meaning "I have not yet though about this value, and I have made a note of it so that I will remember to give it a value later".
...
Semantically complete UML models do not have default or unspecified values; they simply have values.



So in the absence of any other knowledge an association with unspecified multiplicities is interpreted as many-to-many.
So you better specify your multiplicities somewhere even if the association is many-to-many to avoid any confusion.
 
Stu Thompson
Hooplehead
Posts: 136
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much for the authoritative response!

Stu
 
Creativity is allowing yourself to make mistakes; art is knowing which ones to keep. Keep this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic