rose tutorial fnl

Upload: benson-k-b

Post on 04-Jun-2018

233 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Rose Tutorial Fnl

    1/38

  • 8/13/2019 Rose Tutorial Fnl

    2/38

    Lect 1: Rational Rose Tutorial 2

    Lab Objective: Graphic Model

    Specify the Graphics Class Diagram:

  • 8/13/2019 Rose Tutorial Fnl

    3/38

    Lect 1: Rational Rose Tutorial 3

    Graphic Objects

    Graphic Selection

    Circle

    Panel

  • 8/13/2019 Rose Tutorial Fnl

    4/38

    Lect 1: Rational Rose Tutorial 4

    Graphic Model: UML Elements

    Generalization

    AggregationAssociation Abstract Class

    Concrete Class

    Concrete operation

    attribute

    Abstract operationDependency

    role

    multiplicity

    navigability

  • 8/13/2019 Rose Tutorial Fnl

    5/38

    Lect 1: Rational Rose Tutorial 5

    Start Rational Rose

    Start Rose

    Start Programs Rational Rose

    Rational Rose

  • 8/13/2019 Rose Tutorial Fnl

    6/38

    Lect 1: Rational Rose Tutorial 6

    Create a New Model

    When Rose is started

    When Rose has been started: File New

  • 8/13/2019 Rose Tutorial Fnl

    7/38

    Lect 1: Rational Rose Tutorial 7

    Create a New Model

    From Scratch

    Cancel the loaded window

    Using a Template or Frame-work

    Select

    OK

    From File System

    Existing

    OR

    Recent

  • 8/13/2019 Rose Tutorial Fnl

    8/38

    Lect 1: Rational Rose Tutorial 8

    To Save a Model

    File Save o Save As

  • 8/13/2019 Rose Tutorial Fnl

    9/38

    Lect 1: Rational Rose Tutorial 9

    Create a Class Diagram

    Browser: Logical View Right Button Menu New ClassDiagram

    Menu : BrowseClass Diagram

  • 8/13/2019 Rose Tutorial Fnl

    10/38

    Lect 1: Rational Rose Tutorial 10

    Creating more Diagrams

    Select in Browser

    Right Button Menu New

    Browse Menu

  • 8/13/2019 Rose Tutorial Fnl

    11/38

    Lect 1: Rational Rose Tutorial 11

    Toolbar for Class Diagrams

    Any element of a diagram can be created by

    placing the mouse pointer over a Tool in the Toolbar

    Drag&Drop over the diagram canvas

    text

    class

    interface

    asociation

    Association class

    packageNote Anchor

    dependency or instantiation

    Notegeneralization

    realization

    Pointer

  • 8/13/2019 Rose Tutorial Fnl

    12/38

    Lect 1: Rational Rose Tutorial 12

    Create a Class

    Place mouse pointer on Class Tool Toolbar : Click Class button Icon

    Menu: Tools Create Class

    Click on Diagram Window

    OR

    Browser : Sel. Logic View right button menu New Class(Sel. Clase Drag &Drop over Diagram Window)

  • 8/13/2019 Rose Tutorial Fnl

    13/38

    Lect 1: Rational Rose Tutorial 13

    Create Diagram Elements

    Place Mouse Pointer

    Click on Toolbar button

    Sel. Diagram in Browser right button New

    Menu

    Tools

    Create Click on diagram

  • 8/13/2019 Rose Tutorial Fnl

    14/38

  • 8/13/2019 Rose Tutorial Fnl

    15/38

    Lect 1: Rational Rose Tutorial 15

    Specify Diagram Elements

    Specification Window

    Allows you to specify a

    model element (diagrams,

    classes, packages,

    relationship...) The attributes or sub-

    elements to be specified

    depend on the selected

    element

    In each TabWindow attributes and sub-elements would be specified

  • 8/13/2019 Rose Tutorial Fnl

    16/38

    Lect 1: Rational Rose Tutorial 16

    Specify Diagram Elements

    Open Specification Window

    Double Click on element via Browser or Diagram Window

    Sel. element (Browser,Diagram Window) Mouse right button menu

    Open Specification

    Sel. elemento Browse menu Open Specification

    Shorcuts of TabWindows, Properties, WIndow Specification Menus

    Sel. Element (Browser,Diagram Window) right button Menu new

    (attribute, operation...) OR OR

  • 8/13/2019 Rose Tutorial Fnl

    17/38

    Lect 1: Rational Rose Tutorial 17

    Class Graphic

    Synchronized

    An element

    Can be in multiple diagrams

    Only one instance in the Browser

  • 8/13/2019 Rose Tutorial Fnl

    18/38

    Lect 1: Rational Rose Tutorial 18

    Delete an Element

    Shallow Delete

    Edit Delete

    Select element in diagram key DEL

    Deep Delete

    Select element in Browser click right button Delete

    Select element in diagram Click CTRL+D

    It is not deleted from the MODEL!! (only from the diagram, not from Browser)

    It is deleted from the MODEL!! (It will disapear from the diagram and from the Browser)

  • 8/13/2019 Rose Tutorial Fnl

    19/38

    Lect 1: Rational Rose Tutorial 19

    Create an Operation

    Diagram: Select class Mouse right button menu NewOperation

    Browser: Select class Mouse right button menu New

    Operation

  • 8/13/2019 Rose Tutorial Fnl

    20/38

    Lect 1: Rational Rose Tutorial 20

    Specify an Operation

    Directly: write the signature of the method > nameOperation( param: Typo,...) : Return Type

    Indirectly: Class Specifcation tab Operations right button menu Insert (operation)

    Double click on method Operation Specification Name Details right button menuInsert (parameter)

  • 8/13/2019 Rose Tutorial Fnl

    21/38

    Lect 1: Rational Rose Tutorial 21

    Specify an Operation

    Name

    Parameter

    Name,Type

    Return Type

    Accesibility

    Public, Protected, Private

    Abstract o Concrete

    (checkbox Abstract in Details TabWindow)

  • 8/13/2019 Rose Tutorial Fnl

    22/38

    Lect 1: Rational Rose Tutorial 22

    Create an Attribute

    Diagram: Select class Mouse right button menu NewAttribute

    Browser: Select class Mouse right button menu New

    Attribute

    Browser: would be updated in Diagram Window

  • 8/13/2019 Rose Tutorial Fnl

    23/38

    Lect 1: Rational Rose Tutorial 23

    Specify Attribute

    Directly: write the signature of the attribute

    > nameAttribute : Type

    Indirectly: Class Specification tab Attributes right button menu Insert (attribute)

    Double click on attribute Attribute Specification Name Type

  • 8/13/2019 Rose Tutorial Fnl

    24/38

  • 8/13/2019 Rose Tutorial Fnl

    25/38

    Lect 1: Rational Rose Tutorial 25

    Class Relationships

    UML Relationships in Rational Rose

    Generalization

    Association

    Aggregation Composition

    Dependency

  • 8/13/2019 Rose Tutorial Fnl

    26/38

  • 8/13/2019 Rose Tutorial Fnl

    27/38

    Lect 1: Rational Rose Tutorial 27

    Relaciones UML en Rose

    Aggregation

    Dependency or Instantiation

    AB

    AB

    AB

    Composition

  • 8/13/2019 Rose Tutorial Fnl

    28/38

  • 8/13/2019 Rose Tutorial Fnl

    29/38

    Lect 1: Rational Rose Tutorial 29

    Specify Generalization

    Like the rest of the elements:

    Double click on element

    Sel. element right button menu Open Specification or

    Shortcut of TabWindow/Property

    Sel. Sel element Browse menu Specification

    (note: it does appear on the Browser)

  • 8/13/2019 Rose Tutorial Fnl

    30/38

    Lect 1: Rational Rose Tutorial 30

    Create an Association

    Place mouse pointer over Tool

    Click on Toolbar button

    Menu Tools Create Generalization

    Click on Diagram Window Connect element B to A

  • 8/13/2019 Rose Tutorial Fnl

    31/38

  • 8/13/2019 Rose Tutorial Fnl

    32/38

    Lect 1: Rational Rose Tutorial 32

    Specify Association

    Specify Navegability

    Accesibility

    public (+), protected (#), private (-)

    Multiplicity (1..n, 0..n, etc...) Aggregation

    Role names

    Association names

    Content Type: Reference, Value, no specify

    B A

    0..n1

    -roleAagregationName

    0..n1

    -roleB

  • 8/13/2019 Rose Tutorial Fnl

    33/38

    Lect 1: Rational Rose Tutorial 33

    Model Organization

    A model can be organized using packages

    Graphic Model

    Folder Structure

    (group, include model elements)

  • 8/13/2019 Rose Tutorial Fnl

    34/38

    Lect 1: Rational Rose Tutorial 34

    Move Elements across Packages

    Drag&Drop in each Package Browser from

    one to another

    One to One

    Pay attention: by moving the classes it does notmean that associations will move as well!!

    (Rational Rose 2000>)

    They are elements with Identity

  • 8/13/2019 Rose Tutorial Fnl

    35/38

    Lect 1: Rational Rose Tutorial 35

    Copy Cut Paste Elements between diagrams

    Within the same Rational Rose model we are

    talking about the diagrams figures

    The elements appearing in the Browser are the

    only elements in the entire model. An element can appear in multiple diagrams

    If it is a different package, indicate from where the package

    come from from

  • 8/13/2019 Rose Tutorial Fnl

    36/38

    Lect 1: Rational Rose Tutorial 36

    Copy Cut Paste Elements between diagrams

    Between two instances of Rational Rose

    Copy, Paste

    create the new elements

    If they dont exist in the model destination If they dont exist in the model destination, but the paste

    is in the package destination

    keep the existing if they exist in the model destination

    and the paste is in the same package

  • 8/13/2019 Rose Tutorial Fnl

    37/38

    Lect 1: Rational Rose Tutorial 37

    Exercise 1

    Finalize the Graphics Model

  • 8/13/2019 Rose Tutorial Fnl

    38/38

    L 1 R i l R T i l 38

    Exercise 2

    Model of a Work Plan (Project) - Overview

    Task

    Mil t

    Dependency

    Resource

    TaskGroup

    Project

    GanttView