How to draw class diagrams in StarUML - Detailed method of drawing class diagrams in StarUML

Time: 2020-12-28Source: Huajun Software TutorialAuthor: Ai Xiaomo

Maybe some friends still don’t know how to draw class diagrams in StarUML? So for those who don’t know, hurry up and take a look at the detailed method of drawing class diagrams in StarUML shared by the editor. I hope that by studying this tutorial, it will be helpful to everyone. .

1. Preparation

Enter StarUML and create a new empty project

Modify the file name and module name, create a new package in the module, and create a new ClassDiagram in the package. After it is built, it is as shown in the figure below:

2. Start drawing the interface

Select interface on the left sidebar, click on the canvas, and change the name to product, as shown below

Insert image description here

Select the interface and change the lollipop style interface to a two-layer rectangular style:

Insert image description here

Add a method to the interface: add–Operation, enter the method name, and select isabstract for both the interface name and method, as shown below:

Insert image description here
Insert image description here

Add parameters and return values ​​to the interface, right-click the car method, as shown below:

Insert image description here

Fill in the return value type in the right column

Insert image description here

The drawn interface is as follows:

Insert image description here

3. Draw the implementation class

Select the class on the left sidebar, click on the canvas, change the name to Amacar, add Operation, add parameter, select the return type return, void, select Realization in the Composite Structure on the left to connect, indicating that Amacar inherits product. As shown below:

Insert image description here

4. Export java code

Insert image description here

If you have not configured java in StarUML, there is no option in tools. You can find java through tools-extension Manager, select install, and then restart after the installation is completed. That's it.

Insert image description here

The above is the detailed method of drawing class diagrams in StarUML shared by the editor. Friends in need can take a look.

Related articles更多>>

Popular recommendations