35 min WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010. They may not show up well on other PowerPoint versions. You can download PowerPoint 2010 viewer from here. These slides contain a lot of animations. For optimal results, watch in slideshow mode.
What word is common to all three?
What word is common to all three? models [… are representations of something else]
models … are not the real thing!
models … are simpler than the real thing!
models
models … capture different aspects
models … combat complexity
models bigger roles in … are indispensable for bigger projects
CS2103/T, Lecture 10, Part 1, [Oct 21, 2016] Modelling your way out of complexity: Other useful models CS2103/T, Lecture 10, Part 1, [Oct 21, 2016]
models for what?
models for what?
models for what? i. for analysis ii. for communication iii. as a blueprint
Model-Driven Development iii. as a blueprint
models for what? i. for analysis ii. for communication iii. as a blueprint
models for what? In CS2103? i. for analysis ii. for communication Most common use i. for analysis ii. for communication In CS2103? iii. as a blueprint
Nope, we don’t use UML diagrams models for what? Most common use i. for analysis ii. for communication Nope, we don’t use UML diagrams iii. as a blueprint
UML models Structure diagrams Behavior diagrams Class diagrams Object diagrams Use cases Sequence diag. Behavior diagrams Structure diagrams ……………………………. …………………………… ……………………………. …………………………….
UML models Structure diagrams Behavior diagrams Class diagrams Object diagrams Use cases Sequence diag. ……………………………. …………………………… ……………………………. …………………………….
What is the object/class structure? Problem Domain
OO Domain Model = Conceptual Class Diagrams Die FaceValue 1 plays Snakes&LaddersGame 2..* owns takes Player Turn 1 played on name id dieValue Piece 1 * is on Board 0..1 1 moves piece from Square 100 1 number moves piece to 1 1 Starts in Ends in OO Domain Model has * AutoMover Snake = Conceptual Class Diagrams Ladder
OO Domain Model Die FaceValue 1 plays Snakes&LaddersGame 2..* owns takes Player Turn 1 played on name id dieValue Piece 1 * is on Board 0..1 1 moves piece from Square 100 1 number moves piece to 1 1 Starts in Ends in OO Domain Model has * AutoMover Snake Ladder
Which class is least likely to appear in an OODM? Student Grade StudentArrayList AcademicMentor domain {a|b|c|d} e.g. domain c 77577 OR tinyurl.com/answerpost
? UML models Structure diagrams Behavior diagrams Class diagrams Object diagrams Use cases Sequence diag. OO domain models ? …………………………… ……………………………. …………………………….
UML models Structure diagrams Behavior diagrams Class diagrams Object diagrams Use cases Sequence diag. OO domain models …………………………… ……………………………. …………………………….
Package diagram
Package diagram Deployment diagram
Package diagram Deployment diagram Component diagram
Composite structure diagram Package diagram Deployment diagram Composite structure diagram Component diagram
UML models Structure diagrams Behavior diagrams Class diagrams Object diagrams Use cases Sequence diag. OO domain models …………………………… Package diagrams Deployment diagrams Component diagrams Composite structure diag. …………………………….
UML models Structure diagrams Behavior diagrams Class diagrams Object diagrams Use cases Sequence diag. OO domain models …………………………… Package diagrams Deployment diagrams Component diagrams Composite structure diag. …………………………….
What is the workflow?
What is the workflow? Activity Diagram
Activity Diagram Show logo [first time use] Load file Show ‘loading’ screen Load file Show file Create file [first time use] init file Activity Diagram
Activity Diagram Show logo [first time use] Load file Show ‘loading’ screen Create file init file Activity Diagram Show file
Activity Diagram actions Show logo [first time use] Load file Show ‘loading’ screen Create file init file Activity Diagram Show file
Activity Diagram Show logo [first time use] Load file Show ‘loading’ screen Create file init file Activity Diagram Show file
Activity Diagram Show logo [first time use] Load file Show ‘loading’ screen Create file init file Activity Diagram Show file
Activity Diagram Show logo [first time use] Load file Show ‘loading’ screen Create file init file Activity Diagram Show file
Activity Diagram Show logo [first time use] Load file Show ‘loading’ screen Create file init file Activity Diagram Show file
Activity Diagram Show logo [first time use] Load file Show ‘loading’ screen Create file init file Activity Diagram Show file
ABCEF ADBCF ABECF ABCF ABCEDF ACBEF A B D E C F
ABCEF ADBCF ABECF ABCF ABCEDF ACBEF A B D E C F
ABCEF ADBCF ABECF ABCF ABCEDF ACBEF A B D E C F
ABCEF ADBCF ABECF ABCF ABCEDF ACBEF A B D E C F
ABCEF ADBCF ABECF ABCF ABCEDF ACBEF A B D E C F
ABCEF ADBCF ABECF ABCF ABCEDF ACBEF A B D E C F
? UML models Structure diagrams Behavior diagrams Class diagrams Object diagrams Use cases Sequence diag. ? OO domain models Activity diagrams Package diagrams Deployment diagrams Component diagrams Composite structure diag. …………………………….
UML models Structure diagrams Behavior diagrams Class diagrams Object diagrams Use cases Sequence diag. OO domain models Activity diagrams Package diagrams Deployment diagrams Component diagrams Composite structure diag. …………………………….
State-dependent behavior
State-dependent behavior
State-dependent behavior hmmp… Who’s there? Knock knock… An object, a component, or a whole system. Ha? Go away come here baby
State-dependent behavior PRE_GAME LOST READY new IN_PLAY WON deduce [incorrect deduction] [correct deduction] [correct deduction && no more cells to deduce] [correct deduction && more cells to deduce] /start timer /stop timer
State-dependent behavior PRE_GAME LOST READY new IN_PLAY WON deduce [incorrect deduction] [correct deduction] [correct deduction && no more cells to deduce] [correct deduction && more cells to deduce] /start timer /stop timer
State Machine Diagram PRE_GAME new READY deduce [incorrect deduction] LOST deduce [incorrect deduction] [correct deduction] /stop timer /start timer [correct deduction && more cells to deduce] deduce IN_PLAY WON deduce [correct deduction && no more cells to deduce] /stop timer
State Machine Diagram states PRE_GAME new READY deduce [incorrect deduction] deduce LOST deduce [incorrect deduction] [correct deduction] /stop timer /start timer [correct deduction && more cells to deduce] deduce IN_PLAY states WON deduce [correct deduction && no more cells to deduce] /stop timer
State Machine Diagram state transitions PRE_GAME new READY deduce [incorrect deduction] deduce LOST deduce [incorrect deduction] [correct deduction] /stop timer /start timer [correct deduction && more cells to deduce] deduce IN_PLAY state transitions WON deduce [correct deduction && no more cells to deduce] /stop timer
State Machine Diagram triggers PRE_GAME new READY deduce [incorrect deduction] deduce LOST deduce [incorrect deduction] [correct deduction] /stop timer /start timer [correct deduction && more cells to deduce] deduce IN_PLAY triggers WON deduce [correct deduction && no more cells to deduce] /stop timer
State Machine Diagram guard conditions PRE_GAME new READY deduce [incorrect deduction] deduce LOST deduce [incorrect deduction] [correct deduction] /stop timer /start timer [correct deduction && more cells to deduce] deduce IN_PLAY guard conditions WON deduce [correct deduction && no more cells to deduce] /stop timer
State Machine Diagram activity PRE_GAME new READY deduce [incorrect deduction] deduce LOST deduce [incorrect deduction] [correct deduction] /stop timer /start timer [correct deduction && more cells to deduce] deduce IN_PLAY activity WON deduce [correct deduction && no more cells to deduce] /stop timer
State Machine Diagram PRE_GAME new READY deduce [incorrect deduction] LOST deduce [incorrect deduction] [correct deduction] /stop timer /start timer [correct deduction && more cells to deduce] deduce IN_PLAY WON deduce [correct deduction && no more cells to deduce] /stop timer
State Machine Diagram
UML models Structure diagrams Behavior diagrams Class diagrams Object diagrams Use cases Sequence diag. OO domain models Activity diagrams Package diagrams Deployment diagrams Component diagrams Composite structure diag. State Machine Diagrams …………………………….
UML models Structure diagrams Behavior diagrams Class diagrams Object diagrams Use cases Sequence diag. OO domain models Activity diagrams Package diagrams Deployment diagrams Component diagrams Composite structure diag. State Machine Diagrams …………………………….
Timing diagram
Interaction overview diagram Timing diagram Interaction overview diagram
Interaction overview diagram Communication diagram Timing diagram Interaction overview diagram Communication diagram
UML models Structure diagrams Behavior diagrams Class diagrams Object diagrams Use cases Sequence diag. OO domain models Activity diagrams Package diagrams Deployment diagrams Component diagrams Composite structure diag. State Machine diagrams Timing diagrams Interaction overview diag. Communication diag.
Try to use these two in your Developer Guide