UML

C

Chris

Hi,

I have some questions about UML and C++;
I have written a class in C++, what is the best diagramm to represent
it ? I will explain the functions from this class...should I use an
activity diagramm for each function ??
A Class Diagramm for one class will not be usefull, I think ?

thx

Chris
 
Z

Zeppe

Chris said:
Hi,

I have some questions about UML and C++;
I have written a class in C++, what is the best diagramm to represent
it ? I will explain the functions from this class...should I use an
activity diagramm for each function ??
A Class Diagramm for one class will not be usefull, I think ?


I think you are a little bit OT because these questions are indeed
related to UML rather than C++ or any other specific programming
language. Anyway, I think you are on the wrong way: UML is not a
programming language, and its purpose is not to represent the same
information the programming language do. So, the idea of describing the
entire behaviour of a class, or even an entire system, via UML diagrams
is in my opinion wrong. C class diagram is used in order to express
relationship between classes, and for a single class it's not useful at
all. To describe the dynamics of a process you need a dynamic
(behavioural) diagram, such activity/sequence/state-machine depending on
the focus of your description (logic of the operation; sequences of
actions and communications between different entities; and internal
state of the system respectively). Anyway, such diagrams are useful to
describe particular aspect of the system that need to be discussed /
studied / shared and for which the code is not enough.

Well, I hope this clarifies at least a lil'bit.

Regards,

Zeppe
 
C

Chris

I think you are a little bit OT because these questions are indeed
related to UML rather than C++ or any other specific programming
language. Anyway, I think you are on the wrong way: UML is not a
programming language, and its purpose is not to represent the same
information the programming language do. So, the idea of describing the
entire behaviour of a class, or even an entire system, via UML diagrams
is in my opinion wrong. C class diagram is used in order to express
relationship between classes, and for a single class it's not useful at
all. To describe the dynamics of a process you need a dynamic
(behavioural) diagram, such activity/sequence/state-machine depending on
the focus of your description (logic of the operation; sequences of
actions and communications between different entities; and internal
state of the system respectively). Anyway, such diagrams are useful to
describe particular aspect of the system that need to be discussed /
studied / shared and for which the code is not enough.

Well, I hope this clarifies at least a lil'bit.

Regards,

Zeppe

Thx for your help Zeppe !
I know now how I will present it !

Regards

Chris
 
J

Jorgen Grahn

Hi,

I have some questions about UML and C++;
I have written a class in C++, what is the best diagramm to represent
it ? I will explain the functions from this class...should I use an
activity diagramm for each function ??
A Class Diagramm for one class will not be usefull, I think ?

Apart from class diagrams, state diagrams are the only part of UML I
find really useful. (Of course, UML didn't invent stats diagrams.)

State diagrams can be used for an isolated class -- if it has any
state that matters, that is.

/Jorgen
 
M

Michael DOUBEZ

Jorgen Grahn a écrit :
Apart from class diagrams, state diagrams are the only part of UML I
find really useful. (Of course, UML didn't invent stats diagrams.)

That depends at what level you act in the project. IMO data flow
diagrams make understanding, modification and specification a lot easier
throughout the life of the project and use cases help focusing on the
problem.

Michael
 
J

Jorgen Grahn

Jorgen Grahn a écrit :

That depends at what level you act in the project. IMO data flow
diagrams make understanding, modification and specification a lot easier
throughout the life of the project

Never used data flow diagrams, sorry.
and use cases help focusing on the problem.

Oh yes. I forgot to mention use cases. Yes, I sometimes find them
useful, too.

What I've found less helpful is very detailed use cases, class
diagrams and sequence diagrams -- when they are created because
someone mandates it, rather than because they help understanding the
problem or the solution.

/Jorgen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,778
Messages
2,569,605
Members
45,238
Latest member
Top CryptoPodcasts

Latest Threads

Top