Beruflich Dokumente
Kultur Dokumente
Huscar A. Snchez
Lect 1: Rational Rose Tutorial 1
Objectives
Get to know Rational Rose Get Familiar with general functions of Pointed by Rational Rose for Modeling an icon Create a Class Diagram with Rational Rose
Lin e start : Point end : Point Draw(aPanel : Panel) : void Move(to : Point) : void
Recta ngle anchor : Point size : Point Draw(aPanel : Panel) : void Move(to : Point) : void
Circle origin : Point radius : Float Draw(aPanel : Panel) : void Move(to : Point) : void GraphicSelection Dra w(aPa ne l : Pan el) : voi d Mo ve (to : Poin t) : v oid Ad d(g : Graph ics) : vo id Re move(g : Grap hi cs) : Grap hi c Ge tChil dren (n am e : S tri ng ) : G ra ph ic
Graphic Objects
Circle
#graphics
multiplicity
Abstract operation
Concrete Class
Lin e start : Point end : Point Draw(aPanel : Panel) : void Move(to : Point) : void Recta ngle anchor : Point size : Point Draw(aPanel : Panel) : void Move(to : Point) : void Circle origin : Point radius : Float Draw(aPanel : Panel) : void Move(to : Point) : void GraphicSelection Dra w(aPa ne l : Pan el) : voi d Mo ve (to : Poin t) : v oid Ad d(g : Graph ics) : vo id Re move(g : Grap hi cs) : Grap hi c Ge tChil dren (n am e : S tri ng ) : G ra ph ic
Concrete operation
Lect 1: Rational Rose Tutorial
Start Rose
Rational Rose
When Rose is started When Rose has been started: File New
From Scratch Cancel the loaded window Using a Template or Frame-work Select <model> OK From File System Existing
OR
Recent
To Save a Model
Browser: Logical View Right Button Menu New Class Diagram Menu : Browse Class Diagram
10
11
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 Note class Pointer Note Anchor interface asociation generalization package dependency or instantiation Association class
Lect 1: Rational Rose Tutorial
realization
12
Create a Class
Click on Diagram Window OR Browser : Sel. Logic View right button menu New Class (Sel. Clase Drag &Drop over Diagram Window)
13
Click on Toolbar button Sel. Diagram in Browser right button New <element> Menu Tools Create
Click on diagram
14
Directely in the diagram Double click on the class Class Specification for NewClass
15
Specification Window
16
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
Sel. Element (Browser,Diagram Window) right button Menu new <subelement> (attribute, operation...) OR <Property> OR <TabWindow>
17
Class Graphic
Synchronized
18
Delete an Element
Shallow Delete
Deep Delete
Select element in Browser click right button Delete Select element in diagram Click CTRL+D
It is deleted from the MODEL!! (It will disapear from the diagram and from the Browser)
19
Create an Operation
Diagram: Select class Mouse right button menu New Operation Browser: Select class Mouse right button menu New Operation
20
Specify an Operation
Double click on method Operation Specification Name Details right button menu Insert (parameter)
21
Specify an Operation
Name Parameter
Name,Type
MyClassObject GetIsPublic() GetIsProtected() GetIsPrivate()
Abstract o Concrete
Create an Attribute
Diagram: Select class Mouse right button menu New Attribute Browser: Select class Mouse right button menu New Attribute
Specify Attribute
24
Specify Attributes
Public, Protected,Private
25
Class Relationships
Generalization Association
Aggregation
Composition
Dependency
26
A
multiplicity
B
Lect 1: Rational Rose Tutorial
A
Navegability from B to A
27
Aggregation A
Composition A
Dependency or Instantiation B
Lect 1: Rational Rose Tutorial
A
28
Create Generalization
29
Specify Generalization
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)
30
Create an Association
31
Specify Association
Like the rest of Elements: Double click, Sel (Browser Diagram Window) + Right Button Menu, Browse menu)
Specify Association
Specify
Navegability Accesibility
Multiplicity (1..n, 0..n, etc...) Aggregation B Role names Association names Content Type:
-roleB 1
-roleA 0..n
33
Model Organization
Folder Structure
34
One to One Pay attention: by moving the classes it does not mean that associations will move as well!! (Rational Rose 2000>)
35
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.
If it is a different package, indicate from where the package come from from <Package>
Graphic
(f rom Graph ic M odel)
36
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
37
Exercise 1
38
Exercise 2
ID 1 2 3 4 5 6 7 8 9 10 11
Task Nam e
Preparacin Fiesta Invitar Am igos Amigos Invitados Comprar Com prar Com ida Com prar Bebida Limpiar Casa Todo Preparado
Wed 10/1/03 Wed 10/1/03 Wed 10/1/03 Wed 10/1/03 Wed 10/1/03 Wed 10/1/03 Mon 10/6/03 Mon 10/6/03
Mon 10/6/03 Wed 10/1/03 Wed 10/1/03 Fri 10/3/03 Thu 10/2/03 Fri 10/3/03 Mon 10/6/03 Mon 10/6/03 10/6 RG 10/1
Dependency
TaskGroup
Task Milestone39
Exercise 2
Think in a class model that describe a workplan of a project using Software stability concepts Draw it with Rational Rose
40