Use the tools in Visio to build your with classes and objects.
Important: The UML static structure diagram is not available in Visio 2013 and later versions. For information, see UML diagrams in Visio.
In this article:
Add an interface to a class, component, or other element
-
In a static structure, component, or deployment diagram, drag the lollipop Interface shape (represented by a line and circle) onto the drawing page.
-
Glue the endpoint without the circle to a connection point on the class component, or other element.
-
Double-click the Interface shape to add a name, operations, and other property values.
Tip: You can also represent an interface with a rectangular Interface shape that resembles a class. Use this shape when you want to display a list of the interface operations.
Tip: To change the type of shape that appears for an interface, right-click the Interface shape and click Show as Class-like Interface or Show as Lollipop Interface.
Indicate a realizes relationship between a class and an interface or other element
-
In a static structure diagram, right-click any class shape (Class, Parameterized Class, Utility or MetaClass), click Shape Display Options, and then, under General Options, select Realization Link.
-
Glue the control handle for the realization link on a class shape to a connection point on the interface, class, or other element.
Add receptions to a classifier
-
Double-click the shape representing the classifier you want to add receptions to, and then click the Receptions category.
-
Click New to add a new reception.
-
Click the Reception category. Type a name for the reception in the Reception column. In the Signal column, choose the signal to which the classifier, prepared by the reception, reacts, and then choose the other property values you want.
Note: A signal element must exist in the model for it to be available in the Signal list.
-
In the Exceptions category, choose the exceptions, if any, that can be generated by the reception.
Note: An exception element must exist in the model for it to be available in the Signal list.
-
Add any constraints or tagged values you want, and then click OK until you close the shape's UML Properties dialog box.
Add template parameters to a class
-
Double-click the shape (Parameterized Class, Class, Utility, Metaclass, or Bound Element) representing the element that you want to add parameters to, and then click Template Parameters.
-
Click New to add a new parameter.
-
In the Template parameters list:
-
To edit an existing parameter, type a new name in the Template Parameter column.
-
To edit the type, click a Type field, click the arrow, and then select the type from the list.
-
To add documentation, type in the Documentation box.
-
-
Click OK to accept the changes and close the UML Class Properties dialog box.
Tip: You can make any class a parameterized class by adding parameters to a class shape. To hide parameters on any class shape, right-click the shape, click Shape Display Options and then, under Suppress, select Template Parameters.
Add operations to a class, data type, or interface
-
Double-click the shape (Class, Data Type, or Interface) representing the element that you want to add operations to, and then click Operations in the Categories list on the left.
-
Click New to add a new operation.
-
Select Properties to edit the item's properties.
Property
Description
Stereotype
Choose the stereotype you want from the drop-down list. If a stereotype you want to use isn't listed, you can add a new stereotype or edit an existing one by clicking Stereotypes on the UML menu.
Prefix
Type any language-specific annotation text here you want to use to further identify an operation return type.
Suffix
Type any language-specific annotation text here you want to use to further identify an operation return type.
Return Type
Choose an implementation type for the value returned by the operation. If the data type you want isn't listed, right-click a data types package in the tree view, point to New and click Data Type, or create a new class.
Expression
Displays the result of data you've added under Prefix, Return Type, and Suffix.
Visibility
Choose the visibility (public, private, or protected) that applies to the operation. Public means the operation is publicly available to any class. Protected means the operation is available inside the class and to its subclasses. Private means that the operation can only be used inside the class.
OwnerScope
Choose instance for owner scope if the operation is only applicable to objects created using the class. Choose classifier if the operation can be applied to the class itself.
IsPolymorphic
Select if the implementation of the operation can be overridden by subclasses and methods can be defined by subclasses. Leave clear if the method realizing the operation is inherited unchanged by all descendants.
IsQuery
Select when an application of the operation will not modify the state of its element.
Call Concurrency
Concurrency specifies the semantics of concurrent calls to the same passive instance (i.e., an instance originating from a classifier with IsActive=false). Sequential means only one call to an instance can be outstanding at once. Guarded means that multiple calls from concurrent threads can occur simultaneously but only one can commence, with the others blocked until the first operation is complete. Concurrent means that multiple calls from concurrent threads can occur simultaneously and all can proceed concurrently.
Click OK to save these settings.
-
Select Methods, as needed, to edit the item's methods.
Property
Description
Class name
The UML Model Diagram template automatically provides full information about the class name. You can't edit this information.
Operation name
Displays all operations that can have method bodies for this particular class. This includes all operations from the current class, polymorphic operations from base classes, and operations from interfaces that are implemented by the class.
Choose the operation for which you want to specify a method.
Has Method
Select if the operation has a method that realizes it.
Language
Choose the language you want to write the method in.
Method Body
Type the body of the method.
For example a simple C++ method body could be:
{ if (x == 0) { RunCommand(); ProcessResults(); } }
Bind template parameters to a class
-
Drag a Bound Element shape from the UML Static Structure stencil onto the drawing page near the Parameterized Class shape with parameters you want to bind.
-
Drag a Binding shape onto the drawing page and glue the endpoint without an arrowhead to a connection point on the bound element.
-
Glue the Binding endpoint with an arrowhead to a connection point on the Parameterized Class shape.
-
Double-click the Binding shape, and then click Bound Arguments.
-
Under Bound Arguments, select a parameter to which you want to bind a type (if the parameter has no type specified) or select a value (if the parameter has a type specified). Click Properties, choose the type or type the value you want, and then click OK.
-
Click OK to close the UML Binding Properties dialog box.
Attributes and operations associated with the parameterized class are passed to the bound element. Unbound parameters (with no specified type) that you have assigned to the class as attribute types or operation return types, are replaced in the bound element by the types you specified in step 5 above.
Create an object as an instance of a class
-
In a static structure diagram, drag a Class shape onto the drawing page to represent the class you want the object to be an instance of.
-
(Optional) Double-click the Class shape to open the UML Class Properties dialog box. Click Attributes, and then click New to add attributes to the class. Click OK, and then click OK again.
-
Drag an Object shape onto the drawing page, and then double-click the shape.
-
In the UML Object Properties dialog box, click Object and type a name for the object. Under Class, select the class you want the object to be an instance of.
-
Click Attribute Values and select the attribute you want to add an instance value to, and then click Properties. Type a value for the attribute.
-
Click Attribute Link, add any other property values you want, and then click OK.
-
Repeat steps 5 and 6 for all the attributes you want to add instance values to, and then click OK.
Delete template parameters from a class
-
Double-click the shape (Parameterized Class, Class, Utility, Metaclass, or Bound Element) representing the element with parameters you want to delete, and then click Template Parameters.
-
Select the template parameter you want to delete, click Delete, and then click OK.
Edit template parameters for a class
-
Double-click the shape (Parameterized Class, Class, Utility, Metaclass, or Bound Element) representing the element with the parameters you want to edit, and then click Template Parameters.
-
In the Template parameters list, for each parameter you want to edit, click a Type field. Then, click the arrow and select a type from the list.
Note: You can assign parameters with no type specified to attributes as types or to operations as return types.
-
In the Template parameters list, for each parameter that you want to edit, type a new name.
-
In the Documentation box, type the documentation you want.
-
Click New to add another parameter (and follow steps 3 through 5), or click OK to close the UML Class Properties dialog box.
Hide the attribute and operations sections of a class
-
Right-click the Class shape, and then click Shape Display Options.
-
In the UML Shape Display Options dialog box, under Suppress, select Attributes to hide the attributes section, and then select Operations to hide the operations section.
Tip: To show the attributes and operations sections again, right-click the shape, click Shape Display Options, and then clear Attributes and Operations.
Indicate that classes in a package may be referenced
-
In a package diagram, drag a Dependency shape onto the drawing page.
-
Glue the Dependency endpoint without an arrowhead to a connection point on the package that will reference the classes in another package.
-
Glue the Dependency endpoint with an arrowhead to a connection point on the package that contains the target classes that will be referenced.
-
Double-click the Dependency shape to open the UML Dependency Properties dialog box.
-
Under Name, type a name for the dependency. Under Stereotype, choose Import, and then click OK.
Note: Connecting packages with an <<import>> dependency only indicates that classes can be referenced. You still need to set the appropriate visibility for the target classes.
Show the implementation of a type by an implementation class
-
In a static structure diagram, drag a Class shape onto the drawing page. Double-click the shape.
-
In the UML Class Properties dialog box, click Class and type a name for the class. Under Stereotype, choose Type, and then click OK.
-
Drag a second Class shape onto the drawing page. Double-click the shape.
-
In the UML Class Properties dialog box, click Class and type a name for the class. Under Stereotype, choose Implementation Class, and then click OK.
-
Right-click the implementation class and click Shape Display Options. In the UML Shape Display Options dialog box, under General Options, select Realization Link, and then click OK.
-
Drag the control handle on the implementation class shape to create a connector representing a realizes relationship.
-
Glue the endpoint on the realization connector arrowhead to a connection point on the Class shape representing the type.
Thank you PINNACLE CREDIT SPECIALIST. About 4 years ago I realized I needed to figure out how to recover from dad credit. Got a divorce and ex-husband didn’t pay for the house mortgage for a year (he was living in the house). Eventually, the house was sold as a short sale. My beginning scores when I found PINNACLE CREDIT SPECIALIST were the low 600’s (Experian) and high 500’s (Equifax and TransUnion) I paid for their rebuilding program. Slowly but surely, my score went up. Then I qualified to purchase a home. Lucky me cause if I had waited until September of 2020, I wouldn’t have been able to afford my present home. (purchased it for $430,000. It was recently assessed for $585,000. I lived in the Northeast). Today: I still check my credit EVERYDAY and my scores are now Equifax: 801; TransUnion: 809; and Experian: 811; I’m no longer afraid of going to the mailbox or checking my email. I’m no longer scared of answering the phone. I feel in control of my life and now guard my credit. I’m writing this for anyone who is going through it. I want you to know that you will get through this. I mean I did it while barely making ends meet. Getting a divorce, taking care of my daughter and working. Just contact PINNACLE CREDIT SPECIALIST and believe in them you’ll recover just as I did. Thank you to all in this forum who had such sage advice. Because of your sage advice, I have come so far. The journey was difficult and slow, but I’m here. You can reach them by email: PINNACLECREDITSPECIALIST@GMAIL.COM
ReplyDelete