Title: CS 501: Software Engineering Fall 2000
1CS 501 Software EngineeringFall 2000
Lecture 13 Object-Oriented Design III
2Administration
Midterm examination Monday, October 16, 730
to 830 pm, Phillips 219 Closed book
About 5 questions on the material covered in
lectures
3Comments on Presentations
Presentation Standard of graphics has been
high Some text too small (diagrams, screen
dumps) Content Level of detail
Requirements v. design The client
defines the requirements Well done, but time is
short. What is your critical path?
4Modeling Dynamic Aspects of Systems
Interaction diagrams set of objects and their
relationships including messages that may be
dispatched among them Sequence diagrams
time ordering of messages Collaboration
diagrams structural organization of
objects that send and receive messages Activity
diagram flow chart showing flow of control from
activity to activity Statechart diagram models a
state machine
5Bouncing Ball Diagrams
Example http//www.cs.cornell.edu/
domain name TCP connection HTTP get
Client Servers
6Actions on Objects
returnCopy(c)
call return send create destroy
okToBorrow()
local
status
notifyReturn(b)
asynchronous signal
ltltcreategtgt
stereotypes
ltltdestroygtgt
7Links
LibraryMember borrowCopy() returnCopy()
1
0..
on loan
association
class
message
borrowCopy(c)
cCopy
libMemLibraryMember
link
object
8Sequence Diagram Change in Cornell Program
MEngStudent
Cornellian
1 getName()
1.1 name
2 new PhDStudent(name)
PhDStudent
3 ltltdestroygtgt
sequence numbers added to messages
9Sequence Diagram Borrow copy of a Book
libMem LibraryMember
theBookBook
BookBorrower
theCopyCopy
borrow(theCopy)
okToBorrow
borrow
borrow
10Class Inheritance Diagram
Object
Panel
interface
Component
ImageObserver
Applet
Container
HelloWorld
11Sequence DiagramPainting Mechanism
Thread
Toolkit
ComponentPeer
targetHelloWorld
run
run
callbackLoop
handleExpose
paint
12Activity Diagram Process Modeling
branch
materials not ready
materials ready
guard expression
13Activity Diagram Parallel Activities
start state
fork
join
stop state
14State Diagram
returned()
returned()
not borrowable
borrowable
borrowed()last copy
borrowed()not last copy
guard expression
State diagram for class Book
15Implementation Modeling
Subsystem A grouping of elements that specifies
what a part of a system should do. Component (UML
definition) "A distributable piece of
implementation of a system, including software
code (source, binary, or executable) but also
including business documents, etc., in a human
system." A component can be thought of as an
implementation of a subsystem.
16Component Diagram
executable component
hello.java
hello.hml
HelloWorld.class
hello.jpg
17Components and Classes
agent.dll
AgentAction
PatternSearch
Policy
18Components and Classes
agent.dll
Realizes AgentAction PatternSearch Policy
extended component
19Components and Classes
Classes represent logical abstractions.
Components represent physical things.
Components may live on nodes. Classes have
attributes and operations directly. Components
have operations that are reachable only through
interfaces.
20Interfaces
render.java
simulation.exe
IRender
dependency
realization
interface
21Application Programming Interface (API)
API is an interface that is realized by one or
more components.
simulation.exe
IRender
IModels
ILighting
22Components and Replaceability
Components allow system to be assembled from
binary replaceable elements. A component is
physical -- bits not concepts A component can
be replaced by any other component(s) that
conforms to the interfaces. A component is
part of a system. A component provides the
realization of a set of interfaces.