Week 4 - Task 2 - UML State Diagrams - Worksheet
-
Upload
pavan-prakashh -
Category
Documents
-
view
218 -
download
0
description
Transcript of Week 4 - Task 2 - UML State Diagrams - Worksheet
7/21/2019 Week 4 - Task 2 - UML State Diagrams - Worksheet
http://slidepdf.com/reader/full/week-4-task-2-uml-state-diagrams-worksheet 1/18
New name feld is empty
List o names is empty S.A
List o names is not empty S.C
7/21/2019 Week 4 - Task 2 - UML State Diagrams - Worksheet
http://slidepdf.com/reader/full/week-4-task-2-uml-state-diagrams-worksheet 2/18
New name feld is not empty
S.B
S.D
7/21/2019 Week 4 - Task 2 - UML State Diagrams - Worksheet
http://slidepdf.com/reader/full/week-4-task-2-uml-state-diagrams-worksheet 3/18
New name feld is empty
List o names is empty S.A
List o names is not emptyList Item not selected S.C.1
List Item selected S.C.2
7/21/2019 Week 4 - Task 2 - UML State Diagrams - Worksheet
http://slidepdf.com/reader/full/week-4-task-2-uml-state-diagrams-worksheet 4/18
New name feld is not empty
S.B
List Item not selected S.D.1
List Item selected S.D.2
7/21/2019 Week 4 - Task 2 - UML State Diagrams - Worksheet
http://slidepdf.com/reader/full/week-4-task-2-uml-state-diagrams-worksheet 5/18
New name feld is empty
List o names is empty S.A
List o names is not empty
List Item not selected S.C.1
List item selected S.C.2
7/21/2019 Week 4 - Task 2 - UML State Diagrams - Worksheet
http://slidepdf.com/reader/full/week-4-task-2-uml-state-diagrams-worksheet 6/18
New name feld is not empty
S.B
List Item not selected
S.D.1.a
S.D.1.b
List item selected
S.D.2.a
S.D.2.b
New name matches alisted name
New name does not matcha listed name
New name matches alisted name
New name does not matcha listed name
7/21/2019 Week 4 - Task 2 - UML State Diagrams - Worksheet
http://slidepdf.com/reader/full/week-4-task-2-uml-state-diagrams-worksheet 7/18
7/21/2019 Week 4 - Task 2 - UML State Diagrams - Worksheet
http://slidepdf.com/reader/full/week-4-task-2-uml-state-diagrams-worksheet 8/18
7/21/2019 Week 4 - Task 2 - UML State Diagrams - Worksheet
http://slidepdf.com/reader/full/week-4-task-2-uml-state-diagrams-worksheet 9/18
List o names is empty
List o names is not empty
7/21/2019 Week 4 - Task 2 - UML State Diagrams - Worksheet
http://slidepdf.com/reader/full/week-4-task-2-uml-state-diagrams-worksheet 10/18
Name feld is empty
S.A
Name matches a listed nam S.C.1
Name does not match a list S.C.2
7/21/2019 Week 4 - Task 2 - UML State Diagrams - Worksheet
http://slidepdf.com/reader/full/week-4-task-2-uml-state-diagrams-worksheet 11/18
Name feld is not empty
S.B
Name matches a listed namList Item not selected
List item selected
Name does not match a listList Item not selected
7/21/2019 Week 4 - Task 2 - UML State Diagrams - Worksheet
http://slidepdf.com/reader/full/week-4-task-2-uml-state-diagrams-worksheet 12/18
S.D.1.a
S.D.1.b
S.D.2.a
7/21/2019 Week 4 - Task 2 - UML State Diagrams - Worksheet
http://slidepdf.com/reader/full/week-4-task-2-uml-state-diagrams-worksheet 13/18
UL !as" 2
1.Use the Della #nhancement State Dia$%
2. !he f%st th%ee states ha(e been &lly de
*.+o& a%e to fll,in the missin$ ino%mation
S.A List o names is empty
New name feld is empty
Add to List ,/ is hidden
0,emo(e %om List is hidden
S.B List o names is empty
Name feld is not empty
Add to List ,/ is (isible0,emo(e %om List is hidden
S.C.1 List o names is not empty
New name feld is empty
List item not selected
Add to List ,/ is hidden
0,emo(e %om List is hidden
S.C.2 List o names is not empty
New name feld is emptyList item selected
Add to List ,/ is hidden
0,emo(e %om List is (isible
S.D.1.a List o names is not empty
New name feld is not empty
List item not selected
Name matches a listed name
Add to List ,/ is hidden0,emo(e %om List is hidden
S.D.1.b List o names is not empty
New name feld is not empty
List item not selected
Name does not match a listed name
7/21/2019 Week 4 - Task 2 - UML State Diagrams - Worksheet
http://slidepdf.com/reader/full/week-4-task-2-uml-state-diagrams-worksheet 14/18
Add to List ,/ is (isible
0,emo(e %om List is hidden
S.D.2.a List o names is not empty
New name feld is not empty
List item selectedName matches a listed name
Add to List ,/ is hidden
0,emo(e %om List is (isible
S.D.2.b List o names is not empty
New name feld is not empty
List item selected
Name does not match a listed name
Add to List ,/ is (isible
0,emo(e %om List is (isible
-e%ifcation &les1.List o names is empty
2. List o names is not empty
*. List item selected
. List item not selected
3.New name feld is empty
4. New name feld is not empty and
it does not match a name in the list
7/21/2019 Week 4 - Task 2 - UML State Diagrams - Worksheet
http://slidepdf.com/reader/full/week-4-task-2-uml-state-diagrams-worksheet 15/18
5.New name feld is not empty and
it matches a name in the list
6.7hen a Add to List ,/ b&tton is
p%essed
8.7hen a 0, emo(e %om List b&tton
is p%essed
19. Add to List ,/ b&tton is hidden
11. Add to List ,/ b&tton is (isible
12. 0, emo(e %om List b&tton is
hidden
1*. 0, emo(e %om List b&tton is (isible
7/21/2019 Week 4 - Task 2 - UML State Diagrams - Worksheet
http://slidepdf.com/reader/full/week-4-task-2-uml-state-diagrams-worksheet 16/18
St&dent: p&t yo&% name he%e
am as the so&%ce o ino%mation o% this e'e%cise
fned) lea(in$ f(e states only pa%tially defned
in the p%o(ided UL State !able) &sin$ the p%o(ided Dia$%am and the -e%ifcation %&les
Chan$e te't feld so it is not empty ;!%ansition to S.B<
Chan$e te't feld) b&t it ends &p bein$ empty ;Stay in S.A<
Chan$e te't feld so it is empty ;!%ansition to S.A<
Chan$e te't feld) b&t it is not empty ;Stay in S.B<
=%ess Add to List ,/ b&tton ;!%ansition to S.C.2<
Chan$e te't feld so it is not empty and does not match an e'istin$ name ;!%ansition t
Chan$e te't feld so it is not empty and it matches an e'istin$ name ;!%ansition to S.D
Chan$e te't feld) b&t it ends &p bein$ empty ;Stay in S.C.1<
Select one o the names in the list ;!%ansition to S.C.2<
7/21/2019 Week 4 - Task 2 - UML State Diagrams - Worksheet
http://slidepdf.com/reader/full/week-4-task-2-uml-state-diagrams-worksheet 17/18
!he%e a%e >&st two t%ansitions possibilities o% chan$in$ the new name feld
a. Chan$e the new name so it is empty
b. Chan$e the new name so it is not empty
!he%e a%e th%ee t%ansitions possibilities o% chan$in$ the new name feld a. Chan$e the new name so it is empty
b. Chan$e the new name so it is not empty and matches a name in the list o name
c. Chan$e the new name so it is not empty and doe not match a name in the list o
!he%e is a t%ansition based on selectin$ a name %om the list o names
!he%e a%e always two t%ansitions possible &sin$ 0, emo(e %om List b&tton
a. 0, emo(e %om List b&tton and list is now empty
b. 0, emo(e %om List b&tton and list is not empty
It is not possible to &se the 0, emo(e %om List b&tton) it sho&ld be hidden
It is not possible to &se the Add to List ,/ b&tton) it sho&ld be hidden
!he%e is only one t%ansition possible &sin$ the Add to List ,/ b&tton
a. Add to List ,/ b&tton
7/21/2019 Week 4 - Task 2 - UML State Diagrams - Worksheet
http://slidepdf.com/reader/full/week-4-task-2-uml-state-diagrams-worksheet 18/18
It is not possible to &se the Add to List ,/ b&tton) it sho&ld be hidden
!he ta%$et state m&st ha(e
a. an empty new name feld
b. list o names is not empty ;we >&st added a name to it< c. list item is selected ;the >&st added name is the selected name<
!he ta%$et state m&st ha(e
a. new name feld is not empty ;what was %emo(ed has been placed in the feld<
b. list item not selected ;we >&st %emo(ed it<
?ne o the ollowin$ two conditions m&st be t%&e
a. new name feld is empty
b. new name feld is not empty and it matches a name in the list o names
?ne o the ollowin$ two conditions m&st be t%&e
a. new name feld is not empty and the list o names is empty
b. new name feld is not empty) the list o names is not empty) the new name does
any name in the list o names
?ne o the ollowin$ two conditions m&st be t%&e
a. list o names is empty
b. list o names is not empty and no name in the list has been selected
!he%e is only one state that is t%&e that has the 0, emo(e %om List b&tton bein$ (i a. list o names is not empty and a name in the list has been selected