Maak van uw website een conversiemachine - Search strategies 2010 - Klaas Knook
Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.
-
Upload
alyson-jenkins -
Category
Documents
-
view
216 -
download
0
Transcript of Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.
![Page 1: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/1.jpg)
Design - 4 1
Software Systems
Design – 4Class Diagrams (dynamic)
Klaas Sikkel
Software Systems
![Page 2: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/2.jpg)
Design - 4 2
Today’s topic
Software Systems
Class Diagram(static)
State MachineDiagram
datafunctionalitybehaviour
ActivityDiagram
interaction
RequirementsList
Use Case Diagram
SequenceDiagramClass Diagram
(dynamic)
System boundary
CommunicationDiagram
![Page 3: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/3.jpg)
Design - 4 3
Contents
• From use cases to class diagrams– Collaborations– Communication diagram– Use case class diagram
• “Analysis class diagram”– Integration of use case class diagrams– Further analysis
Software Systems
![Page 4: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/4.jpg)
Design - 4 4
Positioning in the design thread
• Part 4 (this lecture) gives a more structured approach to deriving a class diagram.
• However, it’s hard to apply if have no experience with class diagrams
• Therefore we did Part 3 (static class diagrams) first, so that you have some idea about the entity classed that could be involved.
Software Systems
![Page 5: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/5.jpg)
Design - 4 5
Agate Ltd. (Case A in Bennett et al.)
• Agate Ltd. runs publicity campaigns.• For one client there can be multiple campaings• Each campaign consists of a number of different
clients
Software Systems
Client Campaign Advert1 * 1 *
![Page 6: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/6.jpg)
Design - 4 6
Use case
• Adding a new advert to a campaign
Software SystemsBennett Fig. 7.13
![Page 7: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/7.jpg)
Design - 4 7
A Collaboration
Software SystemsBennett Fig. 7.15
![Page 8: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/8.jpg)
Design - 4 8
A Collaboration
Software Systems
Boundary object
Control object
Entity objects
![Page 9: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/9.jpg)
Design - 4 9
BCE Objects/Classes
• Boundary object: provides interface with the outside world
• Control object: implements the logic involved in realising this use case
• Entity object: ‘regular’ object inside the systems
Software Systems
![Page 10: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/10.jpg)
Design - 4 10
Communication diagram (1)
Software SystemsBennett Fig.7.16
![Page 11: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/11.jpg)
Design - 4 11
Communication diagram (2)
Software SystemsBennett Fig. A3.2
![Page 12: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/12.jpg)
Design - 4 12
Corresponding class diagram(use case class diagram)
Software SystemsBennett Fig. A3.3
![Page 13: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/13.jpg)
Design - 4 13
Communication diagram notations (1)
• Standard Com.d. notation
• BCE notation
boundary / control / entity object
Software Systems
:Campaign
![Page 14: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/14.jpg)
Design - 4 14
Communication diagram notations (2)
• *: loop; repeat message for all instances
• Sequential numbering of messages1, 2, 3, … n
• Hierachical numbering of messages• 3, 3.1, 3.1.1, 3.1.1.1, 3.1.1.2, 3.1.2, etc
Software Systems
![Page 15: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/15.jpg)
Design - 4 15
BCE style with hierachical numbering
Software SystemsBennett Fig. A3.11
![Page 16: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/16.jpg)
Design - 4 16
Use case class diagram
Software SystemsBennett Fig. A3.12
![Page 17: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/17.jpg)
Design - 4 17
Other use case CDs (only entity classes)
Software SystemsFrom Bennett, Figs. 7.17, A.6
![Page 18: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/18.jpg)
Design - 4 18Software Systems
Combined class diagram (“Analysis class diagram”)
Bennett Fig. A3.13
![Page 19: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/19.jpg)
Design - 4 19
Overview of method1. For relevant use cases
1.1. Get extended use case description1.2. Design communication diagram1.3. Derive use case class diagram
2. Combine use case CD’s into analysis CD3. Improve analysis class diagram
3.1. Verify correctness (does is match the case description)
3.2. Add further details (data elements, further use cases)
Software Systems
![Page 20: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/20.jpg)
Design - 4 20
Overview of method (contd.)
3.1. Verify correctness (does is match the case description)
We will do this in the lab exercise
3.2. Add further details (data elements, further use cases)
See Bennett for an example
Software Systems
![Page 21: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/21.jpg)
Design - 4 21
Static vs. Dynamic Class diagrams
Static (D-3)• Abstracts from methods• More detailed
semantics of generalization
• A model of information about the real world that should be represented in the system
Dynamic (D-4)• Includes methods• Abstracts from data
types and generalization details
• Constructed by analysing how the system realizes various use cases
Software Systems
![Page 22: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/22.jpg)
Design - 4 22
Exercise
• Service department of internetshop RedHot: handling of products that need repair
• If a product is broken, the customer calls the Customer Service. An employee creates a service record. The customer receives an e-mail with instructions for sending it in, and label for sending a parcel free of charge.
Software Systems
![Page 23: Software Systems Design – 4 Class Diagrams (dynamic) Klaas Sikkel Software SystemsDesign - 41.](https://reader034.fdocuments.us/reader034/viewer/2022042821/56649f585503460f94c7e069/html5/thumbnails/23.jpg)
Design - 4 23
Draw comm. diagram for this use case
Software Systems
Actor action System response1 2 Displays list of customers3 Selects the customer 4 Displays products purcha-
sed by this customer
5 Selects product to be serviced
6 Creates service record
7 Enters problem descr. 8 Stores problem description
9 Creates customer instructions
10 Sends e-mail to customer