Title: UML tutorials Guide
1UML tutorials Guide
2???UML?
- UML?Unified Modeling Language???,????????????
- ?????????????????????????????
- ????,UML???????????????,???????????????????(Visua
lization)????????????(Specification)???(Constructi
on)???????(Documentation)?????????????
3UML(Unified Modeling Language)
- ??????????????????????,????????????????,?????????
?????????????????????(Model),???????????????(Mode
ling)????????????????,???????????????????????????
????????????,???????????
4UML????????????????
- 1. ?????(User view) ??????????????????,???????
????,???????????????????????????????(Use Case
Diagram)? - 2. ????(Structural view) ?????????????????????
????(Clasa Diagram) ????? - 3. ????(Behavior view) ???????(??)????,???????
??????????????????(Sequence Diagram)????(Collabora
tion Diagram)????(State Diagram)????(Activity
Diagram)?
5UML????????????????
- 4. ????(Implementation view)
????????????,???????????????????????(Component
Diagram)? - 5. ????(Environment view) ????????????,??????
??????????????????(Deployment Diagram)?
6UML??
- UML 2.0 ??????13 ???(diagrams)??????,??????????
- ?????(Structure diagrams) ??????????
- ??? (Class Diagram)
- ???(Component diagram)
- ?????(Composite structure diagram)
- ???(Deployment diagram)
- ???(Object diagram)
- ??(Package diagram)
- ?????(Behavior diagrams) ????????????
- ???(Activity diagram)
- ???? (State Machine diagram)
- ????? (Use Case Diagram)
- ?????(Interaction diagrams), ??????????,??????????
?? - ???(Communication diagram
- ?????(Interaction overview diagram) (UML 2.0)
- ???(Sequence diagram)
- ???(UML Timing Diagram) (UML 2.0)
- (???? wiki)
7UML??
8USE CASE DIAGRAM
9Use Case Diagram(?????)
- ???Use Case Diagram??????,?????????(use
goal)?????(system interaction)???????????????????(
Actor)?????(Use Case)????
10Use Case Diagram - Symbol
- ????(Use Case)
- ???
- ??????????
- ??(Actor)
- ???????????????
- ???????
??????
- ??(System)
- ??????????????????
- ???(Association)
- ?????????????
10
11Use Case Diagram Example
????
11
12Detailed use case
Use case name ????
Participating actors Initiated by ??Communicates with ??
Flow of events ???????. ?????????(50??), ?????(2000??), ????(????). ???????????,?????, ????????. ????, ????????.
Exceptions 3.1 ???????????, ???????????.
Entry condition ?????????.
Exit conditions ?????????????????.
12
13Detailed use cases diagram
Association
Object Flow (Dependency)
??
ltltinitiategtgt
????
ltltincludegtgt
ltltincludegtgt
ltltincludegtgt
ltltincludegtgt
????
????
????
????
????
????
??
13
14CLASS DIAGRAM
15Class Diagram(???)
- Class diagram ?????????????,?????????????
16Class Diagram - Symbols
????
??
??
16
17Type, Visibility and Signature
- Type (Attributes)
- Name string
- maxNumPlayers int
- Start date
- Visibility (Attributes and Operations)
- Private -
- protected
- public
- Signature (Operations)
- acceptPlayer(Player) void
- getMaxNumPlayers(void) int
18Identifying Entity Object (found out the class
name)
Use case name ????
Participating actors Initiated by ??
Flow of events ???????. ?????????(50??), ?????(2000??), ????(????). ???????????,?????, ????????. ????, ???????.
Exceptions 3.1 ???????????, ???????????.
Entry condition ?????????.
Exit conditions ?????????????????.
??
??
??
18
19Identifying Entity Object (found out the
attribute)
Use case name ????
Participating actors Initiated by ??
Flow of events ???????. ?????????(50??), ?????(2000??), ????(????). ???????????,?????, ????????. ????, ???????.
Exceptions 3.1 ???????????, ???????????.
Entry condition ?????????.
Exit conditions ?????????????????.
??
?? ???? ????
19
20SEQUENCE DIAGRAM (???)
21Sequence Diagram (???)
- ?UML??,Scenario?????use case???????????,??????use
case????????,??????????????Scenario?????Sequence
Diagram?
22Sequence Diagram
- Describe the dynamic behavior between actors and
the system and between objects of the
system(??????????,???????????????????????) - Useful to find missing objects.
- (?????????????????)
- Complement the class diagrams (which represent
structure). - (?class diagram??????????)
- ??
- ??????(SRS)
- ????(Use Case)
- ???????(SDD)
- ???(Activity Diagram)
23Sequence Diagram Symbols
- Object(??)
- ??????????,????????
- ?????Instance
Actor(???)
Lifeline (????)
Message(??)
Activation (????)
??(????)
????(????)
????
24Sequence Diagram Object Type
- Boundary Object(????)
- ?????????
ltltboundarygtgt ????????
- Entity Object(????)
- ??????
ltltentitygtgt ??
- Control Object(????)
- ???????????
ltltcontrolgtgt ????????
25Sequence Diagram Object Type
- ??
- ?????????
- ???????
- ????
- ???????????
- ????????????????
- ?????????????
- ????????????????????????
- ????????????
26(No Transcript)
27HARDWARE OR SOFTWARE MAPPING-DEPLOYMENT DIAGRAM
28Hardware or Software Mapping
- H/S Mapping?????
- ??????????????
- ??????
- ??????????????
- ???????????????
- ?Object model????????
- Mapping object onto Reality
- CPU, ????, I/O??,????,????
- Mapping Associations onto Reality
- ??,???
29Drawing Hardware/Software Mappings in UML
- Deployment Diagram (UML?????)
- ???????????????
- ????Subsystem Decomposition?H/S Mapping???????????
Node ???????
Component ????????????
Dependency ?????
30TeachingSite Hardware/Software Mapping
31TeachingSite Hardware/Software Mapping
32Advance Design
- 4-1 Composite and Inheritance
- 4-3 Mapping Models to Code
33HW
34Input
Use case name ????
Participating actors Initiated by ??
Flow of events ???????. ?????????(50??), ?????(2000??), ????(????). ???????????,?????, ????????. ????, ???????.
Exceptions 3.1 ???????????, ???????????.
Entry condition ?????????.
Exit conditions ?????????????????.
34
35Sequence diagram (??????!)
- ???????.
- ?????????(50??), ?????(2000??), ????(????).
- ???????????,?????, ????????.
- ????, ???????.
????Form
??
????()
???? Control
new
??(??,??, ????)
??(..)
new
??
35
36Class diagram (???!)
??
?? ???? ????
????Control
??()
????Form
????() ??(.)
CreateAssignmentControl
check()
Assignment
name context Due date
CreateAssignmentForm
createAssignment() set(.)
36
37Example Subsystem
????
????
??
??
?????
??
????
???
??
????
??
??
????
38System architecture
Client
Presentation
Server
Business Logic
????????
????
????
Repository model
Data
Repository
????????
???
????