PowerDesigner object-oriented model (OOM) Description

Source: Internet
Author: User
Tags powerdesigner

1. OOM Introduction

Object-OrientedModel (OOM) object-oriented model. An OOM contains a series of packages, classes, interfaces, and their relationships. These objects form a class structure of all (or part) the logic of a software system design view. An OOM is essentially a static conceptual model of a software system.

(1) use UML to describe the system structure

(2) generate source files (such as Java, C #, and PowerBuilder) in different languages using class diagrams, or convert source files of different types into corresponding class diagrams using reverse engineering.

1.1 create OOM

(1) Select File> New Model Menu item

(2) Select "Object-Oriented Model" (object-oriented Model) in "Model type" on the left)

(3) enter the model name on the right and select the language.

(4) Select a type

1.2 design example Diagram

(1) define Use Cases

(2) Define roles

(3) define Association

1.3 design sequence diagram

(1) Define roles

(2) define an object

(3) define a message

(4) define the activation period

1.4 design class diagram

(1) define a class

(2) define attributes

(3) define the identifier

(4) define operations

(5) define interfaces

(6) create a contact

1) join

2) Dependency

3) Generalization

4) Implementation

1.5 generate code

(1) Select Language → Generate Java Code

(2) Select a class

(3) set generation options

(4) generate code

(5) view the generated code

Ii. Example 2.1 create OOM

File --> new model

 

Here we select the OOM type to use the default Class digoal, and the language is Java.

 

2.2 OOM generates Java code

Create a class through the tool Panel, such:

 

Double-click a class to edit related attributes.

 

Add variables to the class:

 

 

If we want to add a method to the class:

 

 

First, write the method name and return type of the method, and then click the second step to modify the corresponding attributes of the method:

 

Content of the modification method:


The method name cannot be modified. In this step, we can only modify the code corresponding to the method.

 

To add parameters to a method:

 

After the configuration is complete:

 

  • 1
  • 2
  • 3
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.