| This tutorial has been retrieved from Google and the Web Archive after the original site disappeared. |
I couldn't find a tutorial on the web on how to use UML in an actual design. So I will share with you my bad grammar along with my experience on my first UML design.
You can probably use a graphic tool to create UML designs. However I'd recommand a tool created with UML in mind. It will save you a lot of grief. I'm using a freeware tool named dia. I'm not using the latest version, but the 0.2 version seems to work ok, except for the EPS output which I don't particularly like.
A class diagram allows you to document how the class relates to other classes. The class diagram doesn't fix the actual implementation. The actual code might not be a direct translation of the diagram. However the functionnality of the code will remain the same. In the following figure you can observe the following:
Class A is a class which has some attributes (variable) and functions (function).Class A is the parent class of Sub-ClassClass A is associated with Class B. In this case only 1 Class B is associated with possibly multple versions of Class A. The association is named something. Depending on the type of UML diagrams you are using, something can be implemented using a variable or by something else.Class T is a template class. In C++ it would be defined by something like template <class T> Class_T { ... }Class B is an instance of Class T where the parameter T is binded to int.General is a class that can add attributes (or function) to the association between Class A and Class B. In the present case, it adds the variable period.
The above diagram shows the logical relationship between the components. It doesn't mean that a C++ class would be implemented using all the 5 classes represented here. Short cuts can be taken. However, the logical structure must remain the same. For example, you can move period outside of the General class and inside the Sub-Class. But the logic of the association remains the same.
I'm working on the Altima project and for it I want to create an isometric editor that can create worlds. It was decided that everything on the Altima world would be an entity. Using polymorphism, behavior can be added to the basic entity model. My problem is to define an entity that is usable by the server and the iso client.
The simplified requirements are:
To solve the above problem I started to design using UML. The first and second try introduce new UML particularities and the latest one tries to split and simplify the diagrams.
Last modified: Mon Jan 18 15:43:57 EST 1999