Tutorial Rational Rose

40
Lect 1: Rational Rose Tutoria l 1 Rational Rose Tutorial Making use of UML Elements

Transcript of Tutorial Rational Rose

  • Rational Rose TutorialMaking use of UML Elements

    Lect 1: Rational Rose Tutorial

  • ObjectivesGet to know Rational RoseGet Familiar with general functions of Rational Rose for ModelingCreate a Class Diagram with Rational Rose1st Part: Guided2nd Part: StudentPointed by an icon

    Lect 1: Rational Rose Tutorial

  • Lab Objective: Graphic ModelSpecify the Graphics Class Diagram:

    Lect 1: Rational Rose Tutorial

  • Graphic ObjectsGraphic SelectionCirclePanel

    Lect 1: Rational Rose Tutorial

  • Graphic Model: UML ElementsGeneralizationAggregationAssociationAbstract ClassConcrete ClassConcrete operationattributeAbstract operationDependencyrolemultiplicitynavigability

    Lect 1: Rational Rose Tutorial

  • Start Rational RoseStart RoseStart Programs Rational RoseRational Rose

    Lect 1: Rational Rose Tutorial

  • Create a New ModelWhen Rose is startedWhen Rose has been started: File New

    Lect 1: Rational Rose Tutorial

  • Create a New ModelFrom ScratchCancel the loaded windowUsing a Template or Frame-workSelect OKFrom File SystemExistingORRecent

    Lect 1: Rational Rose Tutorial

  • To Save a ModelFile Save o Save As

    Lect 1: Rational Rose Tutorial

  • Create a Class DiagramBrowser: Logical View Right Button Menu New Class DiagramMenu : Browse Class Diagram

    Lect 1: Rational Rose Tutorial

  • Creating more Diagrams Select in Browser Right Button Menu New

    Browse Menu

    Lect 1: Rational Rose Tutorial

  • Toolbar for Class DiagramsAny element of a diagram can be created by placing the mouse pointer over a Tool in the ToolbarDrag&Drop over the diagram canvastextclassinterfaceasociationAssociation classpackageNote Anchordependency or instantiationNotegeneralizationrealizationPointer

    Lect 1: Rational Rose Tutorial

  • Create a ClassPlace mouse pointer on Class ToolToolbar : Click Class button IconMenu: Tools Create Class Click on Diagram WindowORBrowser : Sel. Logic View right button menu New Class (Sel. Clase Drag &Drop over Diagram Window)

    Lect 1: Rational Rose Tutorial

  • Create Diagram ElementsPlace Mouse PointerClick on Toolbar buttonSel. Diagram in Browser right button New Menu Tools Create Click on diagram

    Lect 1: Rational Rose Tutorial

  • Specify Class NameDirectely in the diagramDouble click on the class Class Specification for NewClass

    Lect 1: Rational Rose Tutorial

  • Specify Diagram ElementsSpecification WindowAllows you to specify a model element (diagrams, classes, packages, relationship...)The attributes or sub-elements to be specified depend on the selected elementIn each TabWindow attributes and sub-elements would be specified

    Lect 1: Rational Rose Tutorial

  • Specify Diagram ElementsOpen Specification WindowDouble Click on element via Browser or Diagram WindowSel. element (Browser,Diagram Window) Mouse right button menu Open SpecificationSel. elemento Browse menu Open Specification

    Shorcuts of TabWindows, Properties, WIndow Specification MenusSel. Element (Browser,Diagram Window) right button Menu new (attribute, operation...) OR OR

    Lect 1: Rational Rose Tutorial

  • Class GraphicSynchronizedAn elementCan be in multiple diagramsOnly one instance in the Browser

    Lect 1: Rational Rose Tutorial

  • Delete an ElementShallow DeleteEdit DeleteSelect element in diagram key DEL

    Deep DeleteSelect element in Browser click right button DeleteSelect 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)

    Lect 1: Rational Rose Tutorial

  • Create an OperationDiagram: Select class Mouse right button menu New OperationBrowser: Select class Mouse right button menu New Operation

    Lect 1: Rational Rose Tutorial

  • Specify an OperationDirectly: write the signature of the method> nameOperation( param: Typo,...) : Return TypeIndirectly: Class Specifcation tab Operations right button menu Insert (operation)Double click on method Operation Specification Name Details right button menu Insert (parameter)

    Lect 1: Rational Rose Tutorial

  • Specify an OperationNameParameterName,TypeReturn TypeAccesibilityPublic, Protected, PrivateAbstract o Concrete (checkbox Abstract in Details TabWindow)

    Lect 1: Rational Rose Tutorial

  • Create an AttributeDiagram: Select class Mouse right button menu New AttributeBrowser: Select class Mouse right button menu New AttributeBrowser: would be updated in Diagram Window

    Lect 1: Rational Rose Tutorial

  • Specify AttributeDirectly: write the signature of the attribute> nameAttribute : TypeIndirectly: Class Specification tab Attributes right button menu Insert ( attribute)Double click on attribute Attribute Specification Name Type

    Lect 1: Rational Rose Tutorial

  • Specify AttributesNameTypeAccesibilityPublic, Protected,PrivateClass Abstract or Concrete (checkbox Abstract in Details TabWindow)

    Lect 1: Rational Rose Tutorial

  • Class RelationshipsUML Relationships in Rational RoseGeneralizationAssociationAggregationCompositionDependency

    Lect 1: Rational Rose Tutorial

  • UML Relationships in Rational RoseABAssociationGeneralization (Inheritance)ABAB1..nroleAroleBmultiplicityNavegability from B to A

    Lect 1: Rational Rose Tutorial

  • Relaciones UML en RoseAggregationDependency or InstantiationABABABComposition

    Lect 1: Rational Rose Tutorial

  • Create GeneralizationPlace Mouse Pointer over ToolClick on button ToolbarMenu Tools Create Generalization Click on Diagram Window Connect element B to A

    Lect 1: Rational Rose Tutorial

  • Specify GeneralizationLike the rest of the elements:Double click on elementSel. element right button menu Open Specification or Shortcut of TabWindow/PropertySel. Sel element Browse menu Specification(note: it does appear on the Browser)

    Lect 1: Rational Rose Tutorial

  • Create an AssociationPlace mouse pointer over ToolClick on Toolbar buttonMenu Tools Create Generalization Click on Diagram Window Connect element B to A

    Lect 1: Rational Rose Tutorial

  • Specify AssociationLike the rest of Elements:Double click, Sel (Browser Diagram Window) + Right Button Menu, Browse menu)It will appear as another elementelse in the Browser

    Lect 1: Rational Rose Tutorial

  • Specify AssociationSpecifyNavegability Accesibility public (+), protected (#), private (-)Multiplicity (1..n, 0..n, etc...)AggregationRole namesAssociation namesContent Type: Reference, Value, no specify

    Lect 1: Rational Rose Tutorial

  • Model OrganizationA model can be organized using packagesFolder Structure(group, include model elements)

    Lect 1: Rational Rose Tutorial

  • Move Elements across PackagesDrag&Drop in each Package Browser from one to anotherOne to OnePay attention: by moving the classes it does not mean that associations will move as well!! (Rational Rose 2000>)They are elements with Identity

    Lect 1: Rational Rose Tutorial

  • Copy Cut Paste Elements between diagramsWithin the same Rational Rose model we are talking about the diagrams figuresThe elements appearing in the Browser are the only elements in the entire model.An element can appear in multiple diagramsIf it is a different package, indicate from where the package come from from

    Lect 1: Rational Rose Tutorial

  • Copy Cut Paste Elements between diagramsBetween two instances of Rational Rose Copy, Paste create the new elements If they dont exist in the model destinationIf they dont exist in the model destination, but the paste is in the package destinationkeep the existing if they exist in the model destination and the paste is in the same package

    Lect 1: Rational Rose Tutorial

  • Exercise 1Finalize the Graphics Model

    Lect 1: Rational Rose Tutorial

  • Exercise 2Model of a Work Plan (Project) - OverviewTaskMilestoneDependencyResourceTaskGroupProjectGanttView

    Lect 1: Rational Rose Tutorial

  • Exercise 2Think in a class model that describe a work-plan of a project using Software stability conceptsDraw it with Rational Rose

    Lect 1: Rational Rose Tutorial