visual modeling using rational rose

27
1 Visual Modeling Using Rational Rose Networking LAB OOSD 담담담담 담담담담 담담담 Kyung Hee University

Upload: tiana

Post on 14-Jan-2016

28 views

Category:

Documents


1 download

DESCRIPTION

Visual Modeling Using Rational Rose. Networking LAB OOSD 담당조교 석사과정 이정환. Kyung Hee University. Contents. Introduction to visual modeling using a rational rose Getting started with rational rose Introduction to diagrams Introduction to specifications Class diagrams and specifications - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Visual Modeling Using Rational Rose

1

Visual Modeling Using Rational Rose

Networking LAB

OOSD 담당조교석사과정 이정환

Kyung Hee University

Page 2: Visual Modeling Using Rational Rose

2

Contents Introduction to visual modeling

using a rational rose Getting started with rational rose Introduction to diagrams Introduction to specifications Class diagrams and specifications Simple Example (hello world)

Kyung Hee University

Page 3: Visual Modeling Using Rational Rose

3

Introduction to Visual Modeling Using a Rational Rose

Rational Rose provides support for two essential elements of modern software engineering Component based development Controlled iterative development

Rational Rose use Component Object Modeling (COM) Object Modeling Language (OMT) Booch ’93 method for visual modeling

Kyung Hee University

Page 4: Visual Modeling Using Rational Rose

4

Introduction to Visual Modeling Using a Rational Rose (cont’d)

Visual Modeling Help organize, visualize, understand, and

create complex things The mapping of real world processes of a

system to a graphical representation. Useful for understanding problems,

communication with everyone involved with the project (customers, domain experts, analysts, designers, etc.), modeling complex systems, preparing documentation, and designing programs and databases.

Kyung Hee University

Page 5: Visual Modeling Using Rational Rose

5

Introduction to Visual Modeling Using a Rational Rose (cont’d)

Modeling promotes better understanding of requirements, cleaner designs, and more maintainable systems

Visual modeling captures business processes by defining the software system requirements from the user’s perspective

Kyung Hee University

Page 6: Visual Modeling Using Rational Rose

6

Introduction to Visual Modeling Using a Rational Rose (cont’d)

Modeling with Rational Rose Rational Rose is the visual modeling

software solution that lets you create, analyze, design, view, modify and manipulate components and implement system in a way that makes them truly easy to communicate

Kyung Hee University

Page 7: Visual Modeling Using Rational Rose

7

Getting Started With Rational Rose

The application window

Kyung Hee University

Toolbar

Menu Bar

Browser

DocumentationWindow

Specification Window

Diagram Window

Page 8: Visual Modeling Using Rational Rose

8

Getting Started With Rational Rose (cont’d)

Documentation Window Describe model elements or

relationship The description can include such

information as the roles, keys, constraints, purpose, and essential behavior of the element

Kyung Hee University

Page 9: Visual Modeling Using Rational Rose

9

Getting Started With Rational Rose (cont’d)

Diagram Window Diagram windows allow you to create

and modify graphical views of the current model

Each icon in a diagram represents an element in the model

Kyung Hee University

Page 10: Visual Modeling Using Rational Rose

10

Getting Started With Rational Rose (cont’d)

Overview Window The overview window is a

navigational tool that helps you move to any location on all Rational Rose diagrams

Kyung Hee University

Page 11: Visual Modeling Using Rational Rose

11

Getting Started With Rational Rose (cont’d)

Specification Window A specification enables you to display

and modify the properties and relationships of a model element, such as a class, a relationship, an operation, or an activity

Kyung Hee University

Page 12: Visual Modeling Using Rational Rose

12

Introduction to Diagrams Overview

Diagrams are views of the information contained in a model

Diagram windows Class diagram Use-case diagram Collaboration diagram Sequence diagram Component diagram Statechart diagram Deployment diagram Activity diagram

Kyung Hee University

Page 13: Visual Modeling Using Rational Rose

13

Introduction to Specifications

A specification enables you to display and modify the properties and relationships of a model element, such as a class, a relationship, or an operation

Kyung Hee University

Page 14: Visual Modeling Using Rational Rose

14

Class Diagrams and Specifications

Class diagram overview A class diagram is a picture for describing

generic descriptions of possible systems Class diagrams and collaboration diagrams

are alternate representations of object models

Class diagrams contain classes and object diagrams contain objects, but it is possible to mix classes and objects when dealing with various kinds of metadata, so the separation is not rigid

Kyung Hee University

Page 15: Visual Modeling Using Rational Rose

15

Class Diagrams and Specifications (cont’d)

Class specification A class specification displays and modifies

class properties and relationships Stereotype

A stereotype represents the subclassification of an element

It represents a class within the UML metamodel itself

Some stereotypes are already predefined, but you can also define your own to add new kinds of modeling types

Kyung Hee University

Page 16: Visual Modeling Using Rational Rose

16

Class Diagrams and Specifications (cont’d)

Cardinality The cardinality field specifies the number of

expected instances of the class. In the case of relationships, this field

indicates the number of links between each instance of the client class and the instance of the supplier

You can set a specific cardinality value for the client class, supplier class, or both

Kyung Hee University

Page 17: Visual Modeling Using Rational Rose

17

Class Diagrams and Specifications (cont’d)

Kyung Hee University

Type Description

N(default) Unlimited number of instances

1 One instance only

0..n Zero or more instances

1..n One or more instances

0..1 Zero or one instance

<literal>* Exact number of instances

<literal>..n Exact number of more instances

<literal>..<literal> Specified range of instance

<literal>..<literal>,<literal> The number of instances will be in theSpecified range or an exact number of instances

<literal>..<literal>,<literal>..<literal>

The number of instances will be in one of the specified ranges

Page 18: Visual Modeling Using Rational Rose

18

Class Diagrams and Specifications (cont’d)

Concurrency A class concurrency defines its

semantics in the presence of multiple threads of control

Kyung Hee University

Page 19: Visual Modeling Using Rational Rose

19

Class Diagrams and Specifications (cont’d)

Kyung Hee University

Type Description

Sequential (default) The semantics of the operation are guaranteed only in the presence of a single thread of control. Only on thread of control can be executing in the method at any one time

Guarded The semantics of the operation are guaranteed in the presence of multiple threads of control. A guarded class requires collaboration among client threads to achieve mutual exclusion

Active The class has its own thread of control

Synchronous The semantics of the operation are guaranteed in the presence of multiple threads of control; mutual exclusion is supplied by the class

Page 20: Visual Modeling Using Rational Rose

20

Simple Example (Hello World) Abstract of key point

import java.awt.Graphics;

class HelloWorld extends java.applet.Applet {public void paint (Graphics g) {

d.drawString ("Hello, World!", 10, 10);}

}

Kyung Hee University

Page 21: Visual Modeling Using Rational Rose

21

Simple Example (cont’d) The UML modeling

Kyung Hee University

HelloWorld

paint()

g.drawString("Hello World!", 10, 10)

Page 22: Visual Modeling Using Rational Rose

22

Simple Example (cont’d)

Kyung Hee University

Applet

HelloWorld

paint()

Graphicsg.drawString("Hello World!", 10, 10)

Page 23: Visual Modeling Using Rational Rose

23

Simple Example (cont’d)

Kyung Hee University

Object

Component

ImageObserver

Container

Panel

Applet

HelloWorld

paint()

Page 24: Visual Modeling Using Rational Rose

24

Simple Example (cont’d)

Kyung Hee University

: Thread : Toolkit : ComponentPeer target: HelloWorld

painthandleExpose

callbackLoop

run

Page 25: Visual Modeling Using Rational Rose

25

Kyung Hee University

Simple Example (cont’d)

HelloWorld.html HelloWorld.class HelloWorld.java

Hello.jpg

Page 26: Visual Modeling Using Rational Rose

26

Practice time Make the class diagram of this

source code OOSD.java

Kyung Hee University

Page 27: Visual Modeling Using Rational Rose

27

Kyung Hee University