19

I'm just using StarUML to create my UML Class diagram and something is bothering me. I create an interface representation, which is a circle, however, there is no room to add which methods and attributes the interface defines. Is this normal UML practice?

If not, how do you know (say a class implements this interface and has 4 methods defined) which of the 4 methods came from the interface and which didnt?

Solved:

Ok just incase someone else has this problem- there are two notations, both are possible in StarUML but only one explicitly (the dot notation). To create the <> notation, enter the name as <> IInterface_Name and then draw a realisation line between the implementing classes. Be sure to manually delete the old (wrong) relationship you had by right clicking the class, collection editor and then relations.

1 Answer 1

47

It is very simple:

  1. If you need just show method of interface - right click on interface and un-select Format/Suppress operation (see blue circle on picture)
  2. If you need to display instead of circle just squared form of interface (on my picture it is ISome) use Format/Stereotype Display/Decoration (see red circle on picture bellow)

enter image description here

7
  • Thanks, i found another way- just to show the non-dot notation method, along with a realisation association
    – Jean
    Commented Jul 22, 2011 at 11:33
  • Thanks, I had the same issue and didn't know you could change the shape. However it won't let me add any method declarations to the Interface. I've tried 'Add > Operation' but it just does nothing. How did you add the Operation2 to your ISome? I'm using v2.0.0 mac.
    – scipilot
    Commented Feb 20, 2015 at 23:46
  • DOH! You already answered that in point 1. I hadn't unticked Suppress Operations. Serious case of RTFSO.
    – scipilot
    Commented Feb 20, 2015 at 23:51
  • Coming a bit too late to the party but wondered if it is possible to make it default interface to be drawn in squared <<interface>> shape... This should be standard no? I was surprised to see circle for interface
    – Ewoks
    Commented Mar 17, 2018 at 11:07
  • @Ewoks may be I don't get you question right, but if mean "Can I change <<interface>> onto smthng else" - then yes, you can. It is called stereotype. For some reason StarUML allows modify it for regular classes, but Interfaces are displayed with fixed
    – Dewfy
    Commented Mar 20, 2018 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.