Uml Class Diagram Array Notation
Create a Class diagram
Go to [Diagram] – [Class Diagram] to create a Class diagram.
Auto-create Class diagrams
You can automatically create Class diagrams of a package.
- If you have source code, import first to Astah.
– How to import Java source code
– Use Plug-ins to import source code (C++, C#, and Java)
- Right-click on a package in a tree view and select [Auto Create Class Diagram]
- Now you have three options.
1. Simple
This creates a class diagram without Attributes and Operations inside the classes.
2. Detailed
This creates a class diagram with Attributes and Operations inside the classes.
3. Unpack Subpackages
This creates a class diagram with the whole models including models inside the sub-packages if the package you select has sub-packages.
Class
Creating a Class
You can find out 5 ways to create a Class in the Diagram Editor page.
Template Class
You can create a Template Class by adding Template Parameters to a class. There are two ways to do so.
- Select [Add Template Parameter] from Class's Pop-up menu
- Define details at the bottom-left pane under [Template Class].
Attributes
You can create Attributes by clicking the orange diamond that appears when you have a mouse over a Class.
Also, you can create another attribute by hitting the [Enter] key while an attribute is selected.
Attribute Visibilities
There are several ways to show/hide attributes.
In order to change the visibility of attributes on a currently-opened diagram, open the [Initial Visibility] tab from the left-bottom pane in Astah and check the options you want in a diagram and click the [Apply to existing elements] button.
Operations
You can create Attributes by clicking a green bar that appears when you have a mouse over a Class.
Also, you can create another attribute by hitting [Enter] key while an attribute is selected.
Moving Attributes/Operations
You can move around attributes/operations by dragging them to another class or within a class.
Anonymous Bound Class
You can create an anonymous bound class by deleting the name of Bound Class.
Anonymous Bound Classes can be specified to the following:
- Attribute Type
- Operation Return Value
- Operation Parameter Type
- The target of Association End A and Association End B
- Base Class of Instance Specification in Class
- Base Class of Object Node in Activity Diagram
- Base Class of Lifeline in Sequence Diagram and Communication Diagram
Example of creating a Bound Class
- Create a abound class.
- Create a new class and add an attribute whose type is bound class to it.
- When you add the class, you will be asked if you'd like to create a new class. Click [Yes].
- Click [Show Hidden Relationship] from its pop-up menu.
- Then you will get the relationship of the anonymous bound class.
Nest a Class
You can have a class nested to a package by dragging it into a Package.
Association
You can create associations by choosing an association type from a small icon list that appears when you hover a mouse over a class, then directly click on the target class.
Please refer to "Drawing Lines" for more information.
Put Association name back
As your diagram gets complex, association names could be left out and end up being far away from the association line.
In that case, you can bring the association name back to the center of the association line.
Right-click on an association line and click [Init Label Position].
Source: https://astah.net/support/astah-pro/user-guide/class-diagrams/
Posted by: tornatoredixiesays.blogspot.com
Posting Komentar untuk "Uml Class Diagram Array Notation"