Tim Hieu Rational Rose

Click here to load reader

  • date post

    04-Jul-2015
  • Category

    Documents

  • view

    1.937
  • download

    0

Embed Size (px)

Transcript of Tim Hieu Rational Rose

TM HIU V RATIONAL ROSE V CC TNH NNGGing vin: Tn Long PhcSinh vin thc hin:

1 - o Th Cm Hng 2 - Nguyn Trn Anh Tun 3 - L Hng Thin Phc 4 - Nguyn Thanh Hi 5 - Lng Xun Thy1

Ni dungPhn A: Hng dn ci t 11. Gii thiu 2. Tnh nng ca Rational Rose 3. Ci t 3.1 Cc bc ci t 3.2 Chy chng trnh 4. Mt s k hiu thng dng 4.1 Phn t cu trc 4.2 Phn t hnh vi 4.3 Phn t nhm 4.4 Ch thch 4.5 Quan h2

Ni dung (tt)Phn B. Hin thc s UML trn Rational Rose 1. Use Case Diagram 1.1 Tng quan 1.2 S dng Rational Rose thit k 11.33 V d 2. Class Diagram 1.1 Tng quan 1.2 S dng Rational Rose thit k 1.3 V d 3. Sequence Diagram 3.1 Tng quan 3.2 S dng Rational Rose thit k 33.33 V d3

Ni dung (tt)4. State Diagram 44.11 Tng quan 4.2 S dng Rational Rose thit k 4.3 V d 5. Activity Diagram 1.1 Tng quan 1.2 S dng Rational Rose thit k 1.3 V d 6. Collaboration Diagram 3.1 Tng quan 3.2 S dng Rational Rose thit k 33.33 V d4

Ni dung (tt)7. Deployment Diagram 77.11 Tng quan 7.2 S dng Rational Rose thit k 7.3 V d 8. Component Diagram 8.1 Tng quan 8.2 S dng Rational Rose thit k 8.3 V d

5

1. Gii thiuRational rose l phn mm cng c mnh h tr phn tch, thit k h thng phn mm theo i tng. N gip ta m hnh ha h thng trc khi vit m trnh. Rational rose h tr cho vic lm m hnh doanh nghip, gip bn hiu c h thng ca m hnh doanh nghip, gip chung ta phn tch h thng v lm cho chng ta c th thit k c m hnh. M hnh Rose l bc tranh ca mt h thng t nhng phi cnh khc nhau n bao gm tt c cc m hnh UML, actors, use cases, objects, component v deployment nodes, trong h thng. N m t chi tit m h thng bao gm v n s lm vic nh th no v th ngi lp trnh c th dng m hnh nh mt bn thit k cho vic xy dng h thng.

6

1. Gii thiu (TT)

Theo phong cch lp trnh truyn thng th sau khi xc nh yu cu h thng, ngi pht trin s ly mt vi yu cu, quyt nh thit k v vit m chng trnh.

7

22. Tnh nngRational Rose cung cp nhng tnh nng sau y to iu kin thun li cho vic phn tch thit k v xy dng nhng ng dng ca ban: M hnh hng i tng. M hnh cung cp cho UML, COM, OMT v Booch 93. Kim tra ng ngha. H tr pht sinh m cho mt s ngn ng. H tr vic pht trin cho vic kim sot lp i lp li. Pht trin cho nhiu ngi dng v cung cp cho c nhn. Hp nht nhng cng c lm m hnh d liu. Pht sinh ti liu. Bn chnh Rational Rose l s thng nht v m rng. S lin kt t ng ha OLE. Nhiu nn tng sn c.

8

22. Tnh nng (TT)Cc bc pht sinh m: Kim tra m hnh. To lp thnh phn. Thc hin nh x lp vo thnh phn. t thuc tnh pht sinh m trnh. Chn lp, thnh phn hay gi. Pht sinh m trnh.

9

33. Ci tYu cu h thng H iu hnh Windows NT 4.0 with Service Pack 6a and SRP (Security Rollup Package). Windows 2000 with Service Pack 2 or 3 or 4 (English OS). Windows XP with Service Pack 1 or 2. Phn cng Cu hnh phn cng ti thiu nh sau: B x l: 600 MHz. B nh RAM: 512 MB. Khng gian a cng : Typical Installation 720 MB, Compact Installation 173 MB

33.11 Cc bc ci t (tt)Bc 1. Chy file setup.exe. Bc 2. Click (hoc nhn Enter) Next tip tc.

33.11 Cc bc ci t (tt)Bc 3. Chn phin bn ci t Chn Rational Rose Enterprise Edition

33.11 Cc bc ci t (tt)Bc 4. Chn phng thc ci t ca Rational Rose Chn ci t t CD

33.11 Cc bc ci t (tt)Bc 5. Trnh ci t t ng chy

33.11 Cc bc ci t (tt)Bc 6. Chn Next tip tc ci t

33.11 Cc bc ci t (tt)Bc 7. Xem cc khuyn co ca Rational Rose

33.11 Cc bc ci t (tt)Bc 8. Chp nhn bn quyn

33.11 Cc bc ci t (tt)Bc 9. Chn ng dn ci t

33.11 Cc bc ci t (tt)Bc 10. Ty chn cc gi ci t b sung Cc gi ny h tr vic pht sinh ra m ngun cc chng trnh nh: Java, C++, Visual Basic,

33.11 Cc bc ci t (tt)Bc 11. Sn sng ci t

33.11 Cc bc ci t (tt)Bc 12. Mn hnh trng thi ci t

33.11 Cc bc ci t (tt)Bc 13. Hon thnh qu trnh ci t

33.22 Chy chng trnhBt u vi Rational Rose: [Start] menu -> All Programs Chn Rational Software/Rational Rose 2000 Enterprise Edition

33.22 Chy chng trnh (tt)Ta i hp thoi Create New Model xut hin -> Click Cancel m Rational Rose :

33.22 Chy chng trnh (tt)

Getting Started with Rational Rose11. Titlebar 2. Menu bar 3. Toolbox : Hp cng c s cha nhiu icon ty vo Model tung ng 44. Standard Toolbars

_ Application window _ Browser window _ Documentation window _ Diagram window _ Overview window _ Specification window

33.22 Chy chng trnh (tt)MI TRNG RATIONAL ROSE BAO GM 3 CA S CHNH: a) Browser window: - Ca s trnh duyt cha ton b phn t m hnh trong m hnh hin hnh. - Browser c th tri ni hay bm dnh ( docked) bng cch nhp p chut trn bin ca s. Cc phn t m hnh hin th trong Browser di dng cy. Cc thng tin nn c th hin bng du + , nu nhn chut trn du + ta s c thng tin nn b) Documentation window: - Ca s ti liu l ni to lp, sa i vn bn gn vo phn t m hnh ( tc nhn, UC, quan h , thuc tnh, thao tc, thnh phn , nt). - to ti liu cho m hnh ta lm nh sau : chn phn t (click chut trn phn t), nhp ti liu vo ca s ti liu. Ca s ti liu cng tt / m , tri ni hay bm dnh nh ca s Browser. c) Diagram window - Ca s biu l ni cho php ta to lp v sa i khung nhn ha m hnh hin hnh. - Mi biu tng trong biu biu din mt thnh phn m hnh ha khc nhau. Ca s biu xut hin khi nhp p chut trn ca s biu trong ca s Browser.

33.22 Chy chng trnh(tt)d) Overview window:Di chuyn chut n biu tng mouse . khi thy xut hin du + ta Drag

e) Specification window:Ca s t t. hin th ca s ny ta lm nh sau: Cch 1: Nhp chut phi trn s hoc Browser -> chn Open Specification Cch 2: Click trn s hoc Browser -> chn [Browser] menu -> chn lnh Specification

4. Mt s k hiu thng dng (tt)1. Phn t cu trc Lp (Class): M t cc i tng cng chung thuc tnh, thao tc, quan h, ng ngha K hiu:

Giao din (Interface): Tp hp cc thao tc lm dch v ca lp hay thnh phn. K hiu: Use case: M t trnh t cc hnh ng h thng s thc hin t c mt kt qu cho tc nhn no . Tc nhn l nhng g bn trong h thng K hiu:

Thnh Phn (Component): Biu din vt l m ngun, cc tp nh phn trong qu trnh pht trienr h thng.

28

4. Mt s k hiu thng dng (tt)2. Phn t hnh vi: Tng tc (interaction): Thng ip trao i gia cc i tng. K hiu:

Trng thi (state): Ch ra cc trng thi m i tng hay tng tc i qua p ng s kin. K hiu:

29

4. Mt s k hiu thng dng (tt)3. Phn t Nhm: Nhm hay cn gi l gi (package), n dng t chc cc lp c chc nng chung li vi nhau. K hiu:

4. Ch thch: Dng gii thch cho cc phn t trong m hnh. K hiu:

30

4. Mt s k hiu thng dng (tt)5. Quan h: Ph thuc (dependence) Quan h ng ngha gia hai phn t, khi thay i phn t c lp s tc ng n phn t ph thuc K hiu:

-

-

-

Kt hp (association) M t lin kt gia cc i tng. K hiu:

31

4. Mt s k hiu thng dng (tt)-

-

Khi qut ha (generalization) Quan h m trong i tng c th s k tha phng thc, thuc tnh ca i tng tng qut K hiu:

-

-

Hin thc ha (realization) Quan h ng ngha gia giao din v lp (hay thnh phn) hin thc lp, gia UC v hp tc hin thc UC. K hiu:

32

HiN THC CC S UML TRN RATIONAL ROSE

33

Cc s trong UMLS i tng (Object Diagram) S tnh hung i tng (Use Case Diagram). S trng thi (State Diagram). S trnh t (Sequence Diagram). S hot ng (Activity Diagram). S cng tc (Collaboration Diagram). S thnh phn (Component Diagram). S trin khai (Deployment Diagram).

34

11.11 Use Case DiagramMt biu Use case ch ra mt s lng cc tc nhn ngoi cnh v mi lin kt ca chng i vi Use case m h thng cung cp. Mt Use case l mt li miu t ca mt chc nng m h thng cung cp, li miu t Use case thng l vn bn, ti liu, nhng km theo cng c th l mt biu hot ng. Cc Use case c miu t duy nht theo hng nhn t ngoi vo ca cc tc nhn. Cc Use case nh ngha yu cu v chc nng i vi h thng.

35

1.2 S dng Rational thit k1. 2. 3. 4.

To biu Use case mi: Nhp chut phi trn gi Use Case View trong browser. Chn New -> Use Case Diagram t thc n t tn cho biu mi. Nhp p trn tn ca biu mi m chng.

1. 2.

Xa biu Use case: C th xa biu use case trong browser, mt khi biu Use case b xa th khng th ly li n. Nhn chut phi ln biu trong browser. Chn Delete t thc n.36

1.2 S dng Rational thit k (tt)Xa Use Case Xa UC khi biu UC nh sau: 1.Chn UC trong biu UC. 2.Nhn phm Delete. 3.UC chn s bin mt khi biu UC nhng n cn trong Browser v trong cc biu khc. Vic xa UC trong ton b m hnh c thc hin nh sau: 1.Chn UC trong biu . 2.Chn Edit> Delete from Model hay nhn phm Ctrl + D. 3.UC va chn b loi khi trong ton b m hnh Browser.

37

1.2 S dng Rational thit k (tt)c t Use Case 1.M c t UC theo cc bc sau 2.Nhn chut phi trn UC trong biu UC. 3.Chn thc n open Specification. Hoc 1.Nhn chut phi trn UC trong Browser. 2.Chn thc n open Specification. Import file vo Use Case 1.Nhn chut phi vo UC> Chn Open Specification> Chn tab File. 2.Kch chut phi vo vng trng ca Files tab. 3.Chn thc n Insert File xen tp. 4.S dng hp thoi Open tm tn tp s gn. 5.Chn Open gn tp vo UC. To Use Case tru tng

=>nh du hp Abstract.38

1.2 S dng Rational thit k (tt)Tc nhn (Actor) To tc nhn Trnh t to tc nhn mi trong biu UC nh sau: 1. Chn nhn Actor trn thanh cng c. 2.Nhn bt k u trong biu UC. Tc nhn mi s c gn tn mc nh NewClass. 3.Nhp tn cho tc nhn mii, n c t ng gn vo browser Xa tc nhn Thao tc tng t xa Use case. t t tc nhn Tng t nh Use Case To tc nhn tru tng 1.To tc nhn trong browser hay biu UC. 2.Nhn chut phi chn Open specification.. 3.Chn Detail tab. 4.nh du hp Abstract.

39

1.2 S dng Rational thit k (tt)Cc quan h trong biu To quan h B sung quan h uses hay include vo biu UC theo cc bc nh 1. Chn nhn Generalization trn thanh cng c 2. Ni UC c th n UC tru tng 33. Nhn chut phi trn ng quan h, chn thc n Open Specification 4.Trong ca s Stereotype: Nhp uses 5. M ca s UC specification ca UC tru tng 6. nh du hp Abstract Xa quan h Xa quan h uses trong biu UC theo cc bc sau: 1.Chn quan h trn biu UC 2.Chn Edit> Delete from Model hay nhn cc phm Ctrl + D Vic b sung hay xa quan h extends trong biu UC c thc hin tng t nh b sung hay xa quan h uses.40

1.2 S dng R