0% found this document useful (0 votes)
45 views

2 Classification

The document discusses four approaches to identifying classes in object-oriented analysis and design: 1) The Noun Phrase Approach identifies candidate classes by looking for nouns and noun phrases in requirements. 2) The Common Class Patterns Approach looks for common patterns like concept, event, organization, and person classes. 3) The Use-Case Driven Approach develops sequence diagrams from use cases to identify participating objects and classes. 4) The Classes, Responsibilities, and Collaborators (CRC) Approach identifies classes and maps their responsibilities and collaborators to cards for analysis.

Uploaded by

Nancy Peter
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

2 Classification

The document discusses four approaches to identifying classes in object-oriented analysis and design: 1) The Noun Phrase Approach identifies candidate classes by looking for nouns and noun phrases in requirements. 2) The Common Class Patterns Approach looks for common patterns like concept, event, organization, and person classes. 3) The Use-Case Driven Approach develops sequence diagrams from use cases to identify participating objects and classes. 4) The Classes, Responsibilities, and Collaborators (CRC) Approach identifies classes and maps their responsibilities and collaborators to cards for analysis.

Uploaded by

Nancy Peter
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 17

CLASSIFICATION

1
Classification Theory
• Classification is the process of checking to see if an object
belongs to a category or a class
• Classes are more important mechanism for classifying
objects
• Classification is concerned more with identifying the classes
of an object than the individual objects in the system
Classification can be defined as the categorization
of input data (things) into identifiable classes via the
extraction of significant features of attributes of the
data from a background of irrelevant data
2
Approaches for Identifying Classes
There are four approaches for identifying classes
• The Noun Phrase Approach
• The Common Class Patterns Approach
• The Use-case driven, sequence/ Collaboration modeling
Approach
• The Classes, Responsibilities and Collaborators
Approach

3
The Noun Phrase Approach
• In this method, we read through the requirements for looking
for noun phrases
• The Nouns are considered to be the classes
• The verbs are considered to be the methods to the classes
• The identified nouns are listed into three categories
– Relevant Classes
– Fuzzy Classes
– Irrelevant Classes

• The nouns in the irrelevant classes are omitted. The


candidate classes are taken from relevant and fuzzy classes
4
Identifying Tentative classes
The following guidelines are used for selecting
classes from the application
• Look for nouns and noun phrases
• Some classes are taken from general knowledge
• All the classes must make a meaning in the application
domain
• Carefully choose and define the class names

5
Selecting classes from relevant and fuzzy categories

• Redundant Classes
– Don’t keep two classes that expresses the same information
– If more than one class is used, then select one that is more
meaningful in the context of the system
• Adjective classes
– He is a tall man
– An adjective can define a different kind of object, different use
of same object, or irrelevant objects
– Only if it makes different kind of object, select it as a class
– Omit the other things

6
• Attribute Classes
– The objects that are used only as values are considered as a
class.
– They are declared as an attribute
– E.g.., “Client Status” is an attribute, not a class

• Irrelevant classes
– Formulate a statement that says the purpose for each
candidate classes
– If such a statement cannot be formed, then omit that class.

7
The Common Class Pattern
Approach
The following patterns of the classes are selected
• Concept class
– A concept is a particular idea of the system
– They are used to say some ideas used to keep track of the business
activities or communications

• Event class
– They are points in time that must be recorded
– Thing happen in a particular date, time etc., are recorded

• Organization class
– Is a collection of people, resources, facilities, or groups to which a
8
user belongs to.
• People Class
– Represents different roles users play in the system
– The peoples who carry out some functions

• Places class
– They are physical locations that the system must keep
information about.

• Tangible things and device class


– They are physical objects or groups of objects or any devices
with which the system interact.

9
Use-case driven approach

• Once the system has been defined in terms of scenarios,


the modeler can understand the classes and the objects
• This is obtained by developing a sequence and collaboration
diagrams for each scenario
• By drawing the sequence diagram, it makes think to the
objects that participate in the diagram
• Hence we can identify the classes and the objects.

10
Implementation of scenarios
• Each scenario shows a different sequence of
interaction between the actors and the system.
• This process helps us to understand the behavior of
the systems objects
• The sequence diagram is created for the lowest use-
case level.

11
CRC approach

• The CRC is a technique used to identify the Classes,


responsibilities and collaborators.
• Through responsibilities we can identify the attributes and
the methods for the classes
• The collaborators are used to identify the co-operative
objects with which the class work with.
• Classes, responsibilities and collaborators cards are 4” X
6” index cards
• This is a cheep, portable, readily available and familiar.
12
• The class name should appear in upper left corner,
followed by a bulleted list of responsibilities.
• The responsibilities should appear in the left two-thirds of
the card
• The list of Collaborators should appear in the right side of
the sheet

13
A Class Responsibilities Collaborators Card

Class Name Collaborators


Responsibilities .....
.....

14
CRC Process
The CRC involves the following Process
1. Identify the classes and the responsibilities
2. Assign Responsibilities
3. Identify Collaborators

• The classes are grouped by common attributes which


provides candidates for the superclasses
• The class names are written into the CRC cards
• The card also notes sub and superclasses to show the
class structure
15
A Class Responsibilities Collaborators Process

Identify Classes
And
Responsibilities

Iterate

Identify Assign
Collaborators Responsibilities

16
Naming Classes

• The class name should be singular


• The names should be comfortable with the clients or the
users
• The class name should reveal the intrinsic nature
• Use readable names, the class name must start with
capital letter. For compound names use capital letter for
starting of each word
• Do not add prefix or suffix codes.

17

You might also like