Design 7
Design 7
Goals
Understanding the relationships between the software that is
being designed and its external environment
Understanding of the context also lets you establish the
boundaries of the system.
Models:
A system context model is a structural model that demonstrates
the other systems in the environment of the system being
developed.
An interaction model is a dynamic model that shows how the
system interacts with its environment as it is used.
Entity objects
Persistent information used by the system
• Does not include “helper” objects, which are usually transient
Control objects
Encapsulated functionality of various parts of the system
Boundary objects
Interaction between the actors and the system
Task
A unit of work that is performed by group members
List of tasks
Contains all tasks for a specific date
Scheduled time
The time period during which the task is supposed to be
performed; represented by the start and end times
Elapsed time
The actual amount of time spent on the task
…
Entity objects
CreateTaskControl
EditTaskControl
DeleteTaskControl
ChooseDateControl
CompletionControl
Controls both completing and un-completing a task
TimingControl
Controls both starting and stopping timing a task
StatisticsDisplayControl
ExitControl
PersistenceControl
Hey, aren’t there too many of them?
Yes and no
Yes: some of these control objects are very closely
related and so can be fused into one
• E.g., CreateTaskControl, EditTaskControl, and
DeleteTaskControl can be replaced by TaskControl object
• E.g., ExitControl doesn’t have to do much except for saving
the task data, so its functionality could be rolled into
PersistenceControl
No: we are looking at the system from the user’s
perspective
• Having different control objects for creating, editing, and
deleting tasks makes these operations explicit in the analysis
model
Example: object diagram for Scheduler, v0.0.0
Types of design goals
Performance
Response time, memory requirements, etc.
Dependability
Robustness, availability, fault tolerance, safety
Security
Cost factors
Development, deployment, upgrade, maintenance,
administration costs
Maintenance factors
Extensibility, modifiability, portability, understandability
End user factors
Utility and usability
Are design goals dependent on each other?
http://www.math-cs.gordon.edu/courses/cps211/
ATMExample/ClassDiagram.html
Class diagram Annotations
Diamond
Diamond attached to the class that contains another class.
Often read as “has a “ from the diamond side to the non-diamond,
and “is part of” from the non-diamond to the diamond.
Filled diamond means the part cannot exist without the container. If
the container is deleted, delete the parts.
http://www.math-cs.gordon.edu/courses/cps211/
ATMExample/ClassDiagram.html
Class diagram Annotations
Triangle
Triangle attached to the whole in an “is a “ relationship.
The class not touching the triangle “is a “ the class touching the
triangle.
The class touching the triangle “can be a “ the class not touching the
triangle (“but it will not always be one”)
http://www.math-cs.gordon.edu/courses/cps211/
ATMExample/ClassDiagram.html
Class diagram Annotations
Small arrow
Two classes are related, but only one knows the relationship exists
The class without the arrow knows the one with the arrow exists
Solid line – the arrow side is contained inside the other side
Dotted line – just has a weak relationship with (maybe creates it
during a method)
http://www.math-cs.gordon.edu/courses/cps211/
ATMExample/ClassDiagram.html
Class diagram Annotations
Dotted line - association
To small arrow – depends on the small arrow side
Non-arrow side “somehow depends upon” arrow side
(small arrow side may be an interface)
Maybe “uses’ , calls, creates, sends, instead of “depends upon”
To large arrow - realizes (implements or executes)
Non arrow side implements or executes arrow side
CRC Cards:
http://www.math-cs.gordon.edu/courses/cps211/ATMExa
mple/CRCCards.html
State diagrams:
http://www.math-cs.gordon.edu/courses/cps211/ATMExa
mple/Statecharts.html
Sequence diagrams:
http://www.math-cs.gordon.edu/courses/cps211/ATMExa
mple/Interactions.html
Objects
Object interfaces have to be specified so that the objects and
other components can be designed in parallel.
Designers should avoid designing the interface representation
but should hide this in the object itself.
Objects may have several interfaces which are viewpoints on the
methods provided.
The UML uses class diagrams for interface specification
Subsystems
Interfaces between systems or subsystems need careful
documenting so that development teams can work
independently towards common goal
Example:
http://www.math-cs.gordon.edu/courses/cps211/ATMExample/D
etailedDesign.html
Trace to requirements
Every element in requirements shows up in design
Walk Through
Meet with ALL developers (not users) to talk through scenarios,
tracing classes and method calls
Ensure agreement of method signatures (input/ output) by both
caller and method developer