Could anybody help me with short question about UML: is it possible to have class and component with the same name? UML 2.0 specfication says that element name should be unique in package, but can I have SomeService component (shown in component diagram) which is implemented in SomeService class (shown in class diagram)?
Thank you in advance,
Rob
Cameron Wallace McKenzie
,
author and cow tipper
staff
If the interface and the implementation have the same name, they must be in different packages. At the very least, you may need a SomeService interface and a SomeServiceImpl class.
If you put the components in different packages it is valid. It might be immensely confusing, but it's valid.
So, if component is EJB, should I show SomeService interface and SomeServiceBean in class diagram and SomeService component in component diagram as follows:
Class diagram:
Component diagram:
Is it correct that SomeService component name will not conflict with SomeService interface name?
Thank you in advance,
Rob
Post by:autobot
She's out of the country right now, toppling an unauthorized dictatorship. Please leave a message with this tiny ad:
a bit of art, as a gift, that will fit in a stocking