You are on page 1of 12

OBJECT-ORIENTED

DESIGN REFRESHER
Emerson Murphy-Hill
This work is licensed under a Creative Commons
Attribution-Noncommercial 2.5 Canada License (some slides from Eric Wohlstadter and Gail Murphy)
Goal

Fifty minutes from now, you will be able to


design and express basic class diagrams and
prototypes
Why Bother with OO Design?
The object-oriented paradigm is currently dominant
for building large systems
Being able to express your ideas as an object-oriented
design allows you to:
 Solidify and reflect on your own idea of how a system
should be built
 Communicate with others about a system before it is
constructed
Class Diagrams
Class
Inheritance
An inheritance link indicating one class is a superclass of the other.
A generalization has a triangle pointing to the superclass.

use dotted line


for interface
inheritance
Composition

Indicates a HAS-A relationship.


The filled diamond is attached to the owner.
the lifetime of the 'part' is controlled by the 'whole’
Instances cannot have cyclic aggregation relationships
(i.e. a part cannot contain its whole).
Multiplicities

The multiplicity of an association or composition end is


the number of possible instances of the class associated
with a single instance of the other end.
Activity
Work in groups (of about 4) on design problem, producing class
diagram(s) that captures the structure of a solution
Design a Usenet news server
 Provide names of available newsgroups
 Fetch a particular range of headers of an available newsgroup
 Fetch a specific article from an available newsgroup
 Accept new posting to a particular newsgroup
 Support threading of articles within a newsgroup
 Differentiate between newsgroups local to the server and those shared
with other servers
 Available newsgroups are specified in configuration file
We’ll share in a few minutes
Prototyping
A good way to communicate with users (and within the
team) about what your software will do
Some options for prototyping:
Mockups. For example, see
http://www.targetprocess.com/agileproductblog/2009/09/de
veloping-targetprocess-eclipse-plugin-sketches.html
Personas. For example, see
http://www.targetprocess.com/agileproductblog/2009/09/de
veloping-targetprocess-eclipse-plugin-personas.html
Activity
Do a Mockup or a Persona for your Usenet server

Again, we’ll share in-class


Wrap-up
We’ve reviewed how to create class diagrams and
prototypes

You’ll need these skills for the Design Review

You might also like