4

I would like to know how to indicate in a UML Class Diagram that 2 classes are partial.

For example:

File 'ClassApart1.cs'

partial class ClassA{ /* this class is used for constructors and methods */ }

File 'ClassApart2.cs'

partial class ClassA{ /* this class is used for properties */ }

Is there any convention to indicate/draw my situation in UML?

atomicBee
  • 79
  • 3
  • 8
  • 2
    Why do you want to show them as separately in UML, partial classes are infact a single class – Habib Jan 30 '14 at 16:40
  • 4
    Why should it *matter* from the point of view of UML that a class is broken out into multiple files? It seems like an unimportant implementation detail. – Servy Jan 30 '14 at 16:40
  • 1
    If you give the class different names, they are no more partial classes. They are two different classes. – Mat J Jan 30 '14 at 16:44
  • If you've got this big of a class, I feel like you have other issues. – George Stocker Jan 30 '14 at 16:47
  • I'm new in UML environment... In my opinion could be interesting to show a deep/detailed description of the classes composing my project. I know that the compiler will see them like a single class but my goal is to show the whole project composition. – atomicBee Jan 30 '14 at 16:50

2 Answers2

4

Just have three boxes connected by lines SomeClass PartOne PartTwo

This image is from ibm:

enter image description here

Servy
  • 202,030
  • 26
  • 332
  • 449
GreatJobBob
  • 271
  • 1
  • 8
1

I am pretty sure that it does not exist any IUML formal convention for that. In fact each tool (C# generator) will bring it own convention. Servy depicted into his answer the "IBM convention". Modelio, for example, uses a dedicated properties...

enter image description here

Red Beard
  • 3,436
  • 1
  • 14
  • 17