Title: A????S? S?S?????O?
1A????S? S?S?????O?
??sa???? st? UML
2?? e??a? ??t??e?µe?? (1)
- St?? p?a?µat??? ??sµ? (p?d??at?, s?????)
- ??t??e?µe?? ????sµ???? ???te??p??e?, a?apa??st?,
a?t?st???e? se ?ap??? a?t??e?µe?? t?? p?a?µat????
??sµ?? - ??t??e?µe?? ????sµ???? ?µad?p???s? µetaß??t??
(stat??? µ????) ?a? s?et???µ???? µe??d??
(d??aµ??? µ????)
3?? e??a? ??t??e?µe?? (2)
??µ?s?? ????? (Public API)
Id??t??? ????? (?ept?µ??e?e? ???p???s??)
4?a??de??µa ??t??e?µ???? ??d??at?
???a?e ?a??t?ta
?ept?µ??e?e? ???p???s?? t?? ?e?t???????
F???a?e
?e???a
5??t??e?µe??
- ??a ta a?t??e?µe?a ?????
- ?a?a?t???st??? ?a? ß??s???ta? se µ?? ?at?stas?.
p.?. - S???? ???µa, ???µa, pe??asµ???, ??p.
- ??d??at? 2 t?????, ???µa, a???µ.ta??t?t??,
pa???sa ta??t?ta ??p - S?µpe??f???, p.?.
- S???? ?aß???e?, t???e? ??? ?a ep?te?e? ??p.
- ??d??at? f?e???e?, a????e?/e?att??e? ta??t?ta,
a????e? ta??t?ta ??p
6??t??e?µe?? ????sµ????
- ??t?st?????? se a?t??e?µe?a t?? p?a?µat????
??sµ??, d?µ?? ded?µ???? (p.?. ??sta, ????, ??p.)
? se ??t? p?? afa??et??? - ????? ?a?a?t???st??? ?a? ?at?stas? (p??
d??????ta? µe µetaß??t??) ?a??? ?a? s?µpe??f???
(p?? ???p??e?ta? µe µe??d???)
7E???e?sµ?? (?ncapsulation)
- H ?????a t?? e???e?sµ?? (encapsulation)
- ??e??e?t?µata
- ?????t? (modular) p?????µµata ? p??a??? ??d??a?
??? ??a a?t??e?µe?? µp??e? ?a ??afte? ?a? ?a
s??t????e? a?e???t?ta ap? ???a a?t??e?µe?a - ?p?????? p????f???a? (?d??t??? µ????/d?µ?s??)
8?p????????a ?eta?? ??t??e?µ????
????????S
????????
???a?e ?a??t?ta
F???a?e
F???a?e
??????
?e???a
9????µata
- ?a a?t??e?µe?a ep?????????? ?a? a????ep?d????
µeta?? t??? ap?st?????ta? µ???µata. - ?p?p???? p????f???a p?? apa?te?ta? d??eta? ??
pa??µet??? t?? µ???µ?t??. - ??e??e?t?µata
- ??? ? a????ep?d?as? ?p?st????eta? µe µetaß?ßas?
µ???µ?t??. - ?a a?t??e?µe?a de ??e???eta? ?a ß??s???ta? st??
?d?a d?e??as?a, ??te ?a? st?? ?d?? ?p?????st?.
10???s? ? ???? ??t??e?µ????
- ??a ???s? ? t??? e??a? ??a s??d?? ? p??t?p? p??
????e? t?? ?????? µetaß??t?? ?a? µe??d??? ????
t?? ?µ?e?d?? a?t??e?µ????. - ???e a?t??e?µe?? e??a? st??µ??t?p? µ?a? ???s??.
11?a??de??µa ???s?? ??d??at?
Id??t??? ????? (?ept?µ??e?e? ???p???s??)
??µ?s?? ????? (Public API)
- Stat??? ?a?a?t???st???
- ???µa
- ???t???
- ---------
- ???aµ??? ?a?a?t???st???
- ?????e ?a??t?ta (???p???s?)
- ??p
12???????µ???t?ta (1)
??d??at?
??d??at? ??????
?????st??? ??d??at?
??d??at? ?????
13???????µ???t?ta (2)
- ?p????se?? (subclasses) ?a? ?pe????se??
(superclasses). - ???e ?p????s? ???????µe? t? s?µpe??f??? ?a? t??
?at?stas? t?? ?pe????s?? t??. - ?? ?p????se?? µp????? ?a epa?e????????
?????d?t??µe?? s?µpe??f??? ?a? ?at?stas?. - ?e?a???a ???se??
14??e??e?t?µata ???????µ???t?ta?
- ?? ?p????se?? p??sf????? e?e?d??e?µ???
s?µpe??f??? ap? ta ????? st???e?a p?? p??sf??e? ?
?pe????s?. ?pa?a???s?µ?p???s? t?? ??d??a t??
?pe????s??. - ?? p????aµµat?st?? µp????? ?a ???p???s???
?pe????se?? p?? ?????ta? afa??et???? ???se??
(abstract classes) ?a? ??????? ?e???e?µ???
s?µpe??f???, ? ?p??a e??d??e?eta? ap? t??
a?t?st???e? ?p????se??. ?? afa??et???? ???se??
de? ????? st??µ??t?pa
15?? e??a? ? UML
- H UML (Unified Modeling Language) e??a? µ??
???ssa ??? - ?at??t?s? p??d?a??af?? ????sµ???? ?a? te?µ????s?
tµ?µ?t?? ????sµ???? - ??apa??stas? µe ?pt??? t??p? (visualization)
tµ?µ?t?? ????sµ???? - ???te??p???s? eta?????? ?a? ????? s?st?µ?t?? p??
de? af????? ????sµ???
16?????? ???? ????sµ????
- ?????s?
- ???????????? µ??t???
- ?pa?t?se?? s?st?µat??
- S?ed?asµ??
- S?ed?asµ?? s?st?µat??
- ?ept?µe??a??? s?ed?asµ??
- ???p???s?
- ??d???p???s?
- ??e????
17???s? t?? UML
UML
?????f???a?? s?st?µata
?ata?eµ?µ??a s?st?µata
?e????????? s?st?µata
S?st?µata p?a?µat???? ??????
S?st?µata ep??e???se??
18St???? t?? UML
- H µ??te??p???s? s?st?µ?t?? µe ß?s? t?? a???? t??
a?t??e?µe??st?af?? µ??t???? - ? d?µ??????a µ?a? µ??te??p???µ???? ???ssa? p??
µp??e? ?a ???s?µ?p????e? t?s? ap? t?? ?????p? ?s?
?? ap? t?? µ??a???
19? ?????a t?? ?fa??es??
- ?st?as? se ep??e?µ??a st???e?a ?a? a????s?
?p????p?? ?ept?µe?e??? - ?a µ??t??a µp????? ?a e?f?ast??? se d?af??et???
ep?peda p?st?t?ta? ?a? ?ept?µ??e?a? - S???eta tµ?µata pe?????f??ta? ?a??te?a µe µ????
s????a a?e???t?t?? ??e??
20?a?a?t???st??? t?? ???t????
- ????ße?a - pe?????f??? µe s?st? t??p? t? s?st?µa.
- S???pe?a d?af??et???? ??e?? de? ?????ta? se
s??????s? µeta?? t???. - ??e????????? t?? ep????????a
- ??µet?ß??ta
- ?ata???t?
21?µ?µata t?? UML
O?e?? ?e?????? d?af??et??? ?a?a?t???st??? t??
s?st?µat?? p?? µ??te??p?????ta?. ??a ???
ap?te?e?ta? ap? ??a s????? d?a??aµµ?t??
??a???µµata ?e?????f??? ta pe??e??µe?a µ?a?
????. ?p?????? e???a d?af??et??? d?a???µµata p??
???s?µ?p?????ta? se s??d?asµ? ??a ?a d?s??? ??e?
t?? ??e?? t?? s?st?µat??
St???e?a µ??t???? ???a? ?? ?????e?
p?? ???s?µ?p?????ta? sta d?a???µµata ??a ?a
a?apa?ast?s??? t?? ???se??, ta a?t??e?µe?a ?a?
t?? µeta?? t??? s?s?et?se??
22??d? t?? ??e?? t?? UML
??? S?stat???? (Component View)
?????? ??? (Logical View)
??? ?e??pt?se?? ???s?? (Use-case View)
??? ?a??ta??? (Deployment View)
??? S???????sµ?? (Concurrency View)
23?????aµµa ?e??pt?s?? ???s?? (Use-Case Diagram)
?e?????fe? t? ?e?t???????t?ta t?? s?st?µat?? ?p??
a?t? ???eta? a?t???pt? ap? t?? ???st?
?p???af? asf??e?a?
Stat?st??? st???e?a p???se??
Stat?st??? st???e?a pe?at??
?e??t??
????t??a? asfa?e???
24??a???µµata ???se?? ? ???e?? (Class Diagram)
??????S
?????G?S??S
???µa S?µß???se???
???µa
S?µß???se???
???s?µ?p??e?
????a???
???µ? ????a???
?????a
0..1
1..
- ?? ???se?? s?s?et????ta? µe d??f????? t??p???
- s??des??
- e???t?s??
- e?d??e?s??(µ?a t??? e??a? e?d??? pe??pt?s?
??p??a? ????? - ?µad?p???s??
25??a???µµata ??t??e?µ????
?e?????? S?s?et?se?? µeta?? S???e???µ????
st??µ??t?p??
Bobs job PC Computer ------------------ ???µa
Dell4 ???µ? 64
Bob-??t???? ------------------ ???µa
Bob.j ?????a32
Bobs Home PC Computer ------------------ ???µaP
entium ???µ? 32
26?????aµµa ?atast?se?? (State Diagram)
On first floor
Moving up
Go up (floor)
arrived
Moving to 1st floor
arrived
Go up (floor)
Moving down
Idle
arrived
Go down (floor)
Time out
27?????aµµa ????????a? (Sequence Diagram)
Print(file)
Computer
PrinterServer
Printer
Queue
Print(file)
printer free Print(file)
printer busy Store(file)
28?????aµµa S??e??as?a?
Queue
Computer
1Print(file)
printer busy 1.2 Store(file)
Printer
PrinterServer
printer free 1.1 Print(file)
29??af???? ?eta?? ??a??aµµ?t?? ????????a? ?a?
S??e??as?a?
- ?????aµµa ????????a? ?e???e? t?? a???????a
µ???µ?t?? a??µesa sta a?t??e?µe?a, µe t?? p???d?
t?? ?????? - ?????aµµa S??e??as?a? ???e? µe?a??te?? ?µfas?
st? pe??e??µe?? ?a? st?? s??se?? µeta?? t??
a?t??e?µ????
30?????aµµa ??ast????t?t?? (Activity Diagram)
- ???e? t?? a???????a?? ??? t?? d?ast????t?t??
- ?e????e? p??sd????sµ??? t?? µ???µ?t?? p??
st?????ta?
?µf???se µ???µa ??s??? ?eµ?t??
??s??? ?eµ?t??
?a???????e??t?.??t?p?s? ( )
?µf???se µ???µa ??t?p?s? st?? ?????
??e??e??? ????? d?s???
??µ??????se postscript a??e???
?eta????se ???t?? µ???µ?t??
??t?p?t??.??t?p?s?()
31?????aµµa S?stat???? (Component Diagram)
?e???e? ta s?stat??? µ??? t?? ??d??a ?a? t??
e?a?t?se?? t???
Window Handler (wind.cpp)
Graphic lib (graphic.dll)
Window Handler (wind.obj)
Comm Handler (comm.hnd)
Comm Handler (commhnd.obj)
Client Program (client.exe)
Main Class (main.cpp)
Main Class (main.obj)
32?????aµµa ?a??ta??? (Deployment Diagram)
Client A Compaq Pro PC
Application Server Silicon Graphics
TCP/IP
Database SERVER VAX
Decnet
TCP IP /
Client B Compaq Pro PC
- ?e???e? t??? ?p?????st?? ?a? t?? s?s?e???
- (??µß??? ) ?a??? ?a? t?? t?p? t?? s??d?se??
33??d? ??a??aµµ?t?? t?? UML
?????aµµa ?e??pt?se?? ???s??
???te???? ???
??a???µµata a?t??e?µ???? ?a? ???se??
Stat???
Katast?se??, ????????a?, S??e??as?a?, ??ast????t?
t??
?s?te???? ???
???aµ???
S?stat??? ?a??ta???
???p???s??
34???sµ??a ????? St???e?a ???t????
???s?
??t??e?µe??
?at?stas?
G????sµata
G????sµata
?e?t?????e?
?e?t?????e?
??µß?? (node)
interface
Use Case
Component
Package
?p?s?µe??s?
35?a?ade??µata S?s?et?se?? ?eta?? ???se??
????t?s?(dependency) (??a st???e?? e?a?t?ta? µe
??p???? t??p? ap? ??p??? ????
???????µ???t?ta ( ??a st???e?? µp??e? ?a ap?te?e?
e?d??? pe??pt?s? ??p???
S??des? (s??d?e? st???e?a ?a? st??µ??t?pa
s??d?sµ??)
?µad???t?ta (??a st???e?? pe????e? ???a st???e?a)
36?pe?te????ta? t?? UML
- Ste?e?t?po ????e? ??a ??? e?d?? st???e???
µ??t???? ßas?sµ??? s ??a ?p????? st???e??
µ??t????.???a? ???p?? sa? ??a ?p????? st???e??
µ??t???? , µe ??p??a ep?p???? st???e?a - Tagged values ?a st???e?a µp????? ?a ?????
?d??t?te? p?? pe??????? ?e?????a t?µ?? s?et???
µe ep?p???? p????f???e? - ?e?????sµ?? T?t??? ??p??a ß?s? p?? pe??????e?
e?te t? ???s? t?? st???e??? e?te t? s?µas?a t??
37Ste?e?t?pa
Actor ?e??t??
?e??t??
?e??t??
? pe??t?? e??a? µ?a ???s? µe t? ste?e?t?p?
Actor ?? ste?e?t?p? p??s??te? ep?p????
s?µas????????? p????f???e? s?et??? µe t??
???s?.?d? ? ???s? e?p??s?pe? ??a? e??te????
???st? t?? s?st?µat??
38Tagged Values ?a? ?e?????sµ??
?µ?da ??????µ???? p???t??
???a?e?? abstract s????af.Hee ?at?stas?dr
aft
0..1
?t?µ?.?????agt60
0..
??µ? a???a??? ?µ.????? ?µe?.
?t?µ?
O s????af?a? ?a? ? ?at?stas? e??a? ?????sµata
???sµ??a ap? t?? ???st?
?e?????sµ??
39???te??p????ta? µe t? UML
F?S? ?????S?S ?d? a?a????ta? ?? apa?t?se?? t??
s?st?µat??
F?S? S?????S?S Epe?te??e? t? µ??t??? a??- ??s??
se µ?a ?e?t??????? te????? ??s?
F?S? ???G???OS?S ?d? e???e?ta? p?? t?
s?st?µa a?apt?sseta? se f?s??? a???te?t?????
F?S? ???????S?S ?? µ??t??? e??a? t??a ?
??- d??a? t?? p?????µµat?? ,? ?p???? ???p??e? t?
s?st?µa
40??t?st????a ??a??aµµ?t?? st?? ???f??e? F?se??
???pt???? e??? S?st?µat??
??a???µµata ?e??pt?se?? ???s??, ???se??,
??ast????t?t??
F?s? a????s??
??a???µµata ???se??, ????????a?, ?atast?se??,
??ast????t?t??, S?stat????
F?s? s?ed?as??
F?s? ???p???s??
?d? d?µ????????ta? e????sta d?a???µµata
??a???µµata ?a??ta???, ????????a? S??e??as?a?
F?s? p?a?µ?t?s??
41?e?t?????e? t?? ???a?e??? ???te??p???s?? (Case
Tools)
- S?ed?asµ?? d?a??aµµ?t?? p?? e?asfa?????? t?
s?st? ???st? t?? st???e??? t?? µ??t???? - ????? ?p????e?s? ded?µ????. ? p????f???a
ap????e?eta? µ??? se ??a µ????. ?? t? ???µa µ?a?
???s?? a????e? s ??a d????aµµa, ? a??a?? a?t?
µet?d?deta? ?a? sta ?p????pa - ?p?st????? p?????s?? t?? µ??t???? ?
pa?a???????s?? e??? st???e??? ap? ??a d????aµµa
se ??a ???? ? ep??tas? t?? pe????af?? t??
st???e??? - ?p?st????? p????? ???st?? -d??e? t?? d??at?t?ta
?a d???e???? p????? ???ste? ta?t?????a - ??µ??????a ??d??a
42???e? ?e?t?????e? t?? ???a?e??? ???te??p???s??
(Case Tools)
- ?a?a???? µ??t???? ap? t?? ??d??a (Reverse
Engineering) - S??e??as?a µe ???a e??a?e?a ?p?? editor,
µeta???tt?st?? ?? ???a ep??e???s?a?? e??a?e?a - ?????? ???? t?? ep?p?d?? afa??es?? , ap? t?
ep?ped? pe????af?? t?? s?st?µat?? st? ep?ped?
??d??a - ??ta??a??? µ??t????.??a µ??t??? ap? ??p???
d????aµµa ?a p??pe? ?a ??e? t? d??at?t?ta ?a
e?s??eta? ap? t? ??a e??a?e?? st? ????