Surjya Narayana Padhi
Surjya Narayana Padhi

Reputation: 7841

How to draw UML Class diagram for my following java code?

I have an abstract process class

Abstract class **A**

it has member function run()

classes B,C,D,E are inherited from abstract class A.

I have an class called F (ProcessFactory) which has a function called getProcess() which takes argument and gives one instance of specified type of process object.

Now another class called G which uses class F and get the instances of class B,C,D,E and work on them.

I would be happy if someone can provide an UML class diagram for the above scenario. As my classes involves threads, so is there anything which can show in UML for thread related classes?

Upvotes: 2

Views: 1554

Answers (1)

vainolo
vainolo

Reputation: 6987

A UML class diagram is a static diagram, so it doesn't care if a class is a thread, a process or a monkey. Everything is a class, which has attributes and methods. You can state that A inherits from thread, but that's about all you can say about threads. So you would get something like this:

enter image description here

  • Edit: please see my comment below for clarification.

Upvotes: 1

Related Questions