Class Diagrams: Identifying and Representing Classes, Slides of Object Oriented Analysis and Design

An overview of class diagrams, discussing the importance of having many simple classes versus few complex ones, and outlining steps for finding and defining classes, their attributes, and operations. It also covers guidelines for extracting classes from specifications and assigning responsibilities.

Typology: Slides

2011/2012

Uploaded on 08/12/2012

dhanvant
dhanvant 🇮🇳

4.9

(9)

89 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Class Diagrams
Identifying and representing Classes
docsity.com
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Class Diagrams: Identifying and Representing Classes and more Slides Object Oriented Analysis and Design in PDF only on Docsity!

Class Diagrams

Identifying and representing Classes

How many classes

Many Classes

Classes have simple behavior Less encapsulation More reusable Easier to Implement

Few Complex Classes

More encapsulation, more private behavior. Less reusable Takes more time to implement More complex to implement

Class Design Step

Define

Class Operations Methods States Attributes Dependencies Associations Generalizations

Simple steps in finding a class

Read and understand the specification.

Extract noun phrases from the specification

and build a list.

Look for nouns that may be hidden (for

example, by the use of the passive voice), and

add them to the list.

Applying the following guidelines:

Model Physical Objects. Model Conceptual Entities. Use a Single term for each concept. Be wary of the use of adjectives.

Attributes & Operations

Find responsibilities using the following

guidelines:

Recall the purpose of each class, as implied by its name and specified in the statement of purpose. Extract responsibilities from the specification by looking for actions and information. Identify responsibilities implied by the relationships between classes.

… Attributes & Operations

Assign responsibilities to classes using the

following guidelines:

Evenly distributed system intelligence. State responsibility as generally as possible. Keep behavior with related information. Keep information about one thing in one place. Share responsibilities among related classes.