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