UML review series 2 (tool usage) [original]
0. This article describes the simple use of Microsoft Visio 2003 (Chinese) and Rational Rose Enterprise Edition 2002 (English version), UML's learning focus on its idea, (its basic concepts,
Please refer to my article "One of the UML Review Series (Basic Concept)") instead of the use of tools, please specify the original "Tianda Sentence" original, my newbie, the detail is more difficult, please ask Fortunately, I can't correct it. ^ _ ^
1.
Microsoft Visio 2003 (Chinese)
A. Installation, Open the Visio Tool, Select Menu: File "-" New "-" "Software" - "UML Model Map", enter the system. The "shape" view will appear on the left, such as no, select menu: "File" - "" Open the mold "-" Software ", select the required UML mold.
B.
Class Diagram: Select "UML Through Structure" of the "Shape" view, such as "class", "interface", "dependency", "use" objects. Select classes, mouse drag to workshops, double-click, appear "Properties" dialog, you can fill in the class name.
The fills will appear in the Model Explorer. Since replication or other operations occur during the operation, the object may
Red shows, indicating that the object name has conflicts, or modifies, otherwise an error may occur when automatic production code.
C.
Member Variables of Class: Open the Properties dialog box, select "Features" in the list box on the left, double-click the first entry in the list box, edit the member variable name, in the "Type" column, you can specify the member variable type. Visibility can specify "public, protected, public", which is the same as C .
D. Add the private member variable and the PUBLIC member variable, click OK to return to the main window, just the editing is displayed above the view.
There is " " in front of the member variable, "-" "-" is expressed as private, "#" is represented as "protected".
E.
Member function of class: Open the class's Properties dialog. Select "Operation" on the left list. In the right list box, each item is a member function name, return type, visibility, polymorphism and other attributes. Here we enter a function name, the "Properties (P) ..." button will become available by disable, the mouse click, the pop-up dialog box, select "Parameters" on the left list box, and edit the properties of a parameter on the right. . Process is drastic, which is omitted.
F.
Contecing lines and inheritance lines: (definition of these two nouns
Please refer to my article "One of the UML Review Series"), we have established several classes, named "Sun", "Mercury", "Pluto", "Saturn", "Earth", obvious, behind Several classes are one of the "Solar System", dragging the "composite" object of the "UML Static Structure" on the left to the main window (the solid arrow of a rhombus is also the solid arrow of the arrow to "the solar system", One company came to "Pluto". Double-click the formation line, pop-up the property dialog box, you can carefully ponder the meaning of the inside. The "Inheritance line" is the "summary" object of the left view. (UML said "inheritance" is "nanhemial", MS "induction" may not be standard, hey, guess), its operation and forming line are as simple as G.
Object: Drag the "object" of the left "Static Structure" to the main window, double-click the class to edit the object name and the class belonging to the class, or you can assign initial values to the member of the object.
H.
Sequence diagram: Select the "UML Sequence" of the left "Shape" view, drag two "object life lines" to the main form, add a "message" object, double-click, you can edit the "message" property. Description: The synchronization of the message is not very clear. It is not clear (not much in design), and there will be interpretation in ROSE, you can refer to it.
I. At this point, Visio is ended, and a thick book in the bookstore, only such a little, huh, huh, huh, huh, it is too much to tell the story, I advocate the first). It took a period of Visio, most of the reference books and colleagues discuss, gradually uncomfortable (the support of the UML standard, some dead plates), Transfer to Rose, after all, "The three people" out of the product, and now be purchased by IMB , Is amazing, hoho
2.
Rational Rose Enterprise Edition 2002 (English)
A.ROSE is a tool that provides the ability to establish, view, modify, and operation components. Windows and UNIX have the corresponding version.
B.
Class Map: Install ROSE, Double-click the "Rational Rose Enterprise Edition" icon of the Start menu, open the ROSE modeling platform, select "VC6 MFC6.0" (the same tool is also the same), the system defaults to we have established a name "MFC 6.0 "package, double-click, you can see some classes in this package. Left view Select "Logical View", double-click "Main" to design class diagrams on the right design window. The middle is a toolbar, simpler, slightly.
C.
With an example: In the "Browse" view on the left, select "Use Case View", double-click "Main", and use the case main window. Between "Browse" and main windows, there are some UML tool objects, drag 2 "actor" objects to the main window, join a "Use Case" object (here is named "Add Task", below To), create 2 "Actor" to "Use Case" objects. Readers can try to edit the properties of these objects. Description: "Actor" creation can click on "Use Case View" right-click menu, "New" - "" actor ", give it a name, then drag it to the main window. In the main window, you can drop it according to the "DEL" key, but "use case view" exists, you can drag it when you need it, press "Ctrl D" to completely delete it. D.
Sequence diagram and collaboration map: Right click on the "Add Task" object of the left view, select the menu "New" - "Sequence Diagram", generate a sequence diagram, enter a name, enter "Add Task", double click, enter Sequence diagram design interface. The corresponding tool bar will appear in the middle. Drag in a "actor" from the left view, drag into a few "object" in the toolbar, drag into the arrow tool (indicate message), readers can try to operate and enrich. We can get a collaboration map directly from the sequence diagram, which is observed for different angles of the same model. Press "F5" to switch between them. The design view can be adjusted on both sides.
E.
Static view: Several classes in the logical view can be associated with Object in the sequence diagram. Open the design interface of the sequence diagram and drag the class to the object ("Object").
F.
Realistic model: The realization structure of the system may be built, and the deployment map is awkward. Open the "main" design interface of "Component View", the toolbar appears. Click "Component View" to the right-click menu, select "New" - "" Component "Add a" Component ", double-click the pop-up properties, you can set the properties of this package, such as EXE, DLL, ACTIVEX, etc., drag it into the design Component design view. Drag the class to the package in the "Browse" view of the left, the class is one of the compositions of this package.
G.ROSE China's automatic production is a complex problem, this vegetable bird is still not working, please give a gift, (maybe the next tutorial is just, huh)
postscript:
I want to learn something with everyone, the foundation is very weak, and the literary thing is not intended. Some friends look halo, I will apologize again, I believe that the article I wrote one day I can understand. Written hard, reprint, please keep the sky, hit the original, hobby C , I hope to cook the wine with the phwati, the party is a life!
Written in 2005.01.03 00:20 Shenzhen Nanshan Science and Technology Park