Questions tagged [class-diagram]

UML diagram describing object classes and relations among them.

A class diagram is a component of the Unified Modeling Language decribing object classes in the object oriented programming paradigm :

  • What they contain (attributes)
  • How they behave (methods)
  • How they are linked together (dependancy)
1529 questions
44
votes
2 answers

How to show Dependency Injection on a UML class diagram?

How do I show Dependency Injection of an object or class in a UML class diagram?
Roman
  • 64,384
  • 92
  • 238
  • 332
39
votes
1 answer

How to present an abstract class in UML class diagram

UML class diagram is a handy tool in object-oriented design. I am using it currently and facing presenting an abstract class with UML. I googled it but got nowhere. So I would like to ask how to express an abstract class in UML class diagram, and…
Rui
  • 3,454
  • 6
  • 37
  • 70
35
votes
2 answers

Shortcut for denoting or implying getters and setters in UML class diagrams

In a UML class diagram, if a class has 5 private attributes that need to be mutable and readable, the UML gets pretty ugly with 10 get/set methods even without any of the class' interesting functionality: Ugliness aside, I feel like the UML should…
kdbanman
  • 10,161
  • 10
  • 46
  • 78
35
votes
5 answers

Difference between ER diagram and Class diagram

I have been given a description and need to draw ER diagram and Class diagram for the description. Now I am having issue with understanding the differences between these 2 diagrams. When I draw the diagrams entities of ER diagram becomes classes.…
New Developer
  • 3,245
  • 10
  • 41
  • 78
33
votes
2 answers

C# code to class diagram

I have a C# solution which has 2 projects in it and I need to generate class diagram from code. I know there is a built-in diagram tool in visual studio, but I'm using 2010 express and it doesn't have that. Is there any free software that is able to…
isklenar
  • 974
  • 2
  • 14
  • 34
31
votes
1 answer

How to build project-wide UML diagram in IntelliJ IDEA?

Trying to reverse-engineer existing project and it would be of great help to see how classes collaborate/depend on each other. Is there a way to build project-wide UML diagram (or class diagram of any kind) in IntelliJ IDEA using build-in…
Denis Kulagin
  • 8,472
  • 17
  • 60
  • 129
29
votes
7 answers

Class diagram examples for RPG (Role Playing Game)

Does anyone know where I can find examples of class diagrams for RP game development? Something similar to here would be quite useful. I'm not looking for things I can slavishly copy, but just for different examples that diagram various solutions to…
Steerpike
  • 17,163
  • 8
  • 39
  • 53
29
votes
3 answers

How to show usage of static methods UML Class Diagram

How do i show the use of static methods in a UML class diagram? class A{ public static void test(){ } } class B{ public void b(){ A.test(); } } How would a class diagram look like, which shows the relationship? UML 2.0 would…
Nicolas
  • 950
  • 1
  • 7
  • 15
28
votes
2 answers

Generating UML diagram from Scala sources

Is there any stand-alone tools (not Eclipse or Idea plugins) for generating class diagram from Scala source files?
Andrey Kuznetsov
  • 11,640
  • 9
  • 47
  • 70
27
votes
2 answers

What is the difference between a Class Diagram vs an Object Diagram?

What is the difference between Class Diagram and Object Diagram?
Ahmed Mahmoud
  • 299
  • 1
  • 4
  • 6
26
votes
5 answers

Should I include getters & setters in class diagram?

I am required to draw a class diagram for my JSF application for a project documentation. So I have lots of classes as managed beans, with many attributes therefore many getters and setters. When I draw the class diagram should I also include the…
Selvin
  • 12,333
  • 17
  • 59
  • 80
26
votes
2 answers

What is the meaning of dashed arrow in UML class diagram?

What is the meaning of the dashed arrow in a UML class diagram in general? As an example: What is the meaning of the dashed arrow in this image (from client to ConcreteCommand): Article: Command pattern
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
25
votes
0 answers

avoid overlapping arrows in plantuml class diagrams

I am using plantuml for creating the class diagrams along with arrows and messages on the arrows. It works perfect untill the diagram is huge. In large diagrams where there are multiple arrows and multiple classes, the arrows gets overlapped with…
Nikhil
  • 849
  • 8
  • 10
25
votes
3 answers

Private nested Java class in UML diagram

I have a question regarding UML. I have a class which simply contains an inner class with the private access modifier - cannot be accessed from anywhere else... Normally in order to present an inner class relation I can use a (+) relation like here…
radekEm
  • 4,617
  • 6
  • 32
  • 45
25
votes
6 answers

How to describe a contained map in UML class diagram?

I have a MyServer class that contains a Map whose keys are MyClientType objects and whose values are MyClient objects. I'd like to depict this relationship in a class diagram but I can't figure out a clean way to do that.
elifiner
  • 7,347
  • 8
  • 39
  • 48