H: reprinted blog.itpub.net/31379315/vi…

Title: MAKING UML diagrams; Online class diagram making; Class diagram making tool Visio class diagram; Make class diagram step by step; Class diagram design and implementation, still drawing class diagram with Visio? Don’t look regret; How to make class diagram; Object-oriented class diagram making,

What is a class diagram

UML class diagrams are used to describe the static structure of a system. It can be used for both general concept modeling and detailed modeling. Class contains data and behavior, which is an important part of object orientation. It is the general name of object sets with the same attributes, operations and relations.

UML class diagrams can also be used for data modeling. It can be used to describe objects and information structures within an application or with other users. In UML, the problem domain is eventually transformed step by step, modeled through classes, and built through programming languages. Classes and their relationships form a class diagram, which can also contain elements such as interfaces and packages, as well as instances such as objects and chains.

Symbols in a class diagram

class

The class is represented by a rectangle, separated by two straight lines into three parts, as shown in the figure below:

Attribute (attributes)

The properties section of the class lists each property of the class on a separate line. The properties section is optional, but when used, it contains each property of the class displayed in list format. Each line uses the format: name: attribute type (for example, name: character).

Operation

Operations are recorded in the bottom region of the class diagram rectangle, which is also optional. Like properties, the operations of a class are displayed in a list format, each on its own line. The operation is recorded using the following notation: Name (parameter list): type of return value

(For example, set name (name argument) :void).

Relationship (relationship)

associated

An association specifies a whole/part relationship between two classes. In an association relationship, objects of the entire class take objects of part of the class as instance data. In a class diagram, associations appear as directed solid lines.

  • One-way association:

In a one-way association, two classes are related, but only one class knows that the relationship exists. One-way associations are drawn as solid lines with open arrows pointing to known classes.

  • Bidirectional (standard) association

Is a link between two classes. Associations are always thought of as bidirectional; This means that both classes know about each other and their relationship, unless you define the association as something else. A solid line between two classes represents a bidirectional association.

Online drawing of UML class diagrams

diversity

Place multiple symbols at the end of the association. These symbols represent the number of instances of one class linked to one instance of another class.

Online drawing of UML class diagrams

For example, a company will have one or more employees, but each employee will only work for one company.

Relationships are as follows:

Graph 1 1 to 1 0.. One, zero or one

  • Multiple 0.. * 0 or more 1.. * One or more visibility is used to indicate who has access to the information contained in the class represented by +, -, #, and ~, as shown in the figure:

Online drawing of UML class diagrams

Superclasses The relationship between a superclass and something more specific, called a subclass. Generalization is sometimes referred to as “being a” relation and is established through an inheritance process. In the class diagram, the generalization relationship appears as a solid line with a large open arrow pointing to the parent class.

Online drawing of UML class diagrams

Abstract Classes and methods In an inheritance hierarchy, subclasses implement specific details, and a parent class defines the framework of its subclasses. A parent class also provides templates for common methods that will be implemented by its subclasses.

Online drawing of UML class diagrams

Abstract class names are usually shown in italics; Alternatively, text annotations can be used to show the abstract class, also known as template {abstract}, after or below its name. An abstract method is one that has no implementation. To create an abstract method, create an action and tilt it.

Implementation an implementation is a relationship between two things, one of which specifies a contract (an interface) and the other (a class) guarantees the execution of that contract by implementing the operations specified in that contract. In the class diagram, implementation relationships appear as dashed lines with open arrows pointing to interfaces.

Online drawing of UML class diagrams

Dependencies represent a “use” relationship between two classes. In the class diagram, dependencies appear as dashed lines. If class A “uses” class B, one or more of the following statements is generally true:

In one or more methods of class A, class B is used as the type of A local variable. Class B is used as the parameter of one or more methods of class A. Class B is used as the return type of one or more methods of class A

There are many ways to create class diagrams. If you choose to draw class diagrams online, you can use Visio or use freedGo Design, an online mapping site. Freedgo Design can be accessed at www.freedgo.com. Freedgo Design is an online graphic design software with rich geometric templates, UML use case diagrams, state diagrams, class diagrams, activity diagrams, sequence diagrams, collaboration diagrams, and more.

The business logic needs to be broken down into smaller, more concrete steps in a concrete class diagram. Then, consider any possible exceptions in the class diagram and, if so, add decision nodes for alternate paths. Keep repeating the process until you reach simple steps that everyone can fully understand.

Now, let’s take a look at how to create nice class diagrams using Freedgo Design.

Step 1: Visit www.freedgo.com, register a user, and log in to the home page

Step 2: Visit www.freedgo.com/draw_index…. Enter the drawing page or click start from the menu at the top of the home page.

Go to the Drawing page and click File -> New from Type -> Software Design -> Class Diagram

Online drawing of UML class diagrams

Or click on the legend, go to the Software Design -> Class diagram in the legend, and select a similar legend to make changes

Online drawing of UML class diagrams

Online drawing of UML class diagrams

Step 3: Drag the appropriate geometric figure from the left symbol bar to the canvas, release, the figure will be fixed on the canvas, double click the geometric figure, can also input text. When the mouse is placed over a graph, a “small triangle” is displayed around the graph to facilitate the user to quickly generate a new graph after clicking.

Online drawing of UML class diagrams

Step 4: The software provides a variety of connection styles. In this type of diagram, you can select the associated connection line. On the connection line, you can also enter text for further clarification.

Online drawing of UML class diagrams

Step 5: The class drawing tool has a rich set of styles. Users can fill closed graphics with monochrome, gradient, and color adjustment of text size and position. After the pattern filled class map, the level of appearance improved a lot. Online drawing of UML class diagrams

Step 6: Complete class diagram drawing step by step according to drawing requirements. Finally completed the whole painting task.

More examples of basic class diagram Please refer to the [illustrations] (www.freedgo.com/showcase.ht.) Or directly visit: www.freedgo.com/showcase.ht.