SlideShare a Scribd company logo
1 of 42
Chapter – 7
Object Analysis: Classification
Classification theory
Classification, the process of checking to see if an
object belongs to a category or a class, is regarded
as a basic attribute of human nature
Classes are an important mechanism for classifying
objects. The chief role of a class is to define the
attributes, methods and applicability of its instances.
The class car e.g.: defines the property color. Each
individual car will have a value for this property such
as yellow or white
Objects have properties(attributes) and
methods(behavior)
A class is a specification of structure, behavior and
the description of an object
Classification is concerned more with identifying the
class of an object than the individual objects within
a system
 classes are important because they create
conceptual building blocks for designing systems
An object can be categorized in more than one way
The problem of classification may be regarded as
one of discriminating things, not between the
individual objects but between classes, via the
search for features or invariant attributes or
behaviors among members of a class
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 irrelevant detail
Approach for identifying classes
Four approaches
1.The noun phrase approach
2.The common class patterns approach
3.The use-case driven, sequence/collaboration
modeling approach
4.The classes, responsibilities and collaborators
(CRC) approach
Noun Phrase Approach
In this method, you read through the
requirements or use looking for noun phrases
Nouns in the textual description are considered
to be classes and verbs to be methods of the
classes
All plurals are changed to singular, the nouns are
listed and list is divided into 3 categories
1.relevant classes
2.fuzzy classes (those classes that we are not
sure about)
3.irrelevant classes
•Diagram
It is safe to scrap the irrelevant classes, which
either have no purpose or will be unnecessary
Candidate classes then are selected from the
other two categories
Identifying classes and developing a UML class
diagram just like other activities is an iterative
process
Identifying Tentative Classes
Guidelines for selecting classes in an application
1. Look for nouns and noun phrases in the use
cases
2. Some classes are implicit or taken form general
knowledge
3. All classes must make sense in the application
domain; avoid computer implementation
classes
4. Carefully choose and define class names
Finding classes in an incremental and iterative
process
Selecting Classes form the Relevant and Fuzzy
Categories:
Guidelines in selecting candidate classes from the
relevant and fuzzy categories of classes in the
problem domain
1. Redundant Classes
 Do not keep two classes that express the same
information
 If more than one word is being used to describe
the same idea, select the one that is the most
meaningful in the context of the system
 Choose your vocabulary carefully; use the word
that is being used by the user of the system
2.Adjective classes
An adjective can suggest a different kind of
object, different use of the same object or it
could be utterly irrelevant.
Does the object represented by the noun behave
differently when the adjective is applied to it ?
3.Attribute classes
Tentative objects that are used only as values
should be defined or restated as attributes and
not as a class
4.Irrelevant classes
Each class must have a purpose and every class
should be clearly defined and necessary
The process of identifying relevant classes and
eliminating irrelevant classes is an incremental
process
Each iteration often uncovers some classes that
have been overlooked
Classification is the essence of good object-
oriented analysis and design
The process of eliminating the redundant classes
and refining the remaining classes is not
sequential
The ViaNet Bank ATM System: Identifying Classes
by using Noun Phrase Approach Initial List of
Noun Phrases: Candidate Classes
Initial study of the use cases of bank system
products the following noun phrase (candidate
classes – may be)
Account Dollar Transaction
Account balance Envelope Transaction History
Amount Four Digit
Approval process Fund
ATM card Invalid PIN
ATM machine Message
Bank Money
Bank Client Password
Card PIN
Cash PIN code
Checking Record
Checking account Savings
Client Savings Account
Client’s Account Step
Currency System
Eliminate the irrelevant classes. Candidate classes
must be selected from relevant and fuzzy classes.
The following irrelevant classes can be eliminated
because they do not belong to the problem
statement: Envelope, Four Digits and step. Strike
outs indicate eliminate classes
Account Envelope
Account balance Four Digits
Amount Fund
Approval process Invalid PIN
ATM card Message
ATM machine Money
Bank Password
Bank client PIN
Card PIN code
Cash Record
Check Savings
Checking account Savings account
Checking Step
Client System
Client’s account Transaction
Currency Transaction History
Dollar
Reviewing the redundant classes and building a
common vocabulary
If different words are being used to describe the
same idea, select the one that is the most
meaningful in the context of the system and
eliminate the others
The following are the different class names that are
being used to refer to the same concept
Client, BankClient = Bank Client(the term chosen)
Account, Client’sAccount = Account
PIN, PIN code = PIN
Checking, Checking Account = Checking Account
Savings, Savings Account = Savings Account
Fund, Money = Fund
ATM Card, Card = ATM Card
Revised list of candidate classes
Account Envelope
Account Balance Four Digit
Amount Fund
Approval Process Invalid PIN
ATM card Message
Bank Money
Bank client Password
Card PIN
Cash PIN Code
Check, checking Savings
Checking Account Savings Account
Client Step
Client’s Account System
Currency Transaction
Dollar Transaction History
Reviewing the Classes Containing Adjectives
Question – Does the object represented by the
noun behave differently when the adjective is
applied to it?
If an adjective suggests a different kind of class
or the class represented by the noun behaves
differently when the adjective is applied to it,
then we need to make a new class
If it is a different use of the same object or the
class is irrelevant, we must eliminate it
In the above e.g.: no elimination
Reviewing the Possible Attributes
Identify the noun phrases that are attributes, not
classes
The noun phrases used only as values should be
restated as attributes
Amount – a value, not a class
Account Balance : an attribute of the Account class
Invalid PIN : it is only a value, not a class
Password : an attribute, possibly of Transaction class
PIN: an attribute, possibly of the BankClient class
Revised list of candidate classes
Account Four Digits
Account balance Fund
Amount Invalid PIN
Approval process Message
ATM card Money
Bank Password
Bank Client PIN
Card PIN Code
Cash Record
Check Savings
Checking Savings Account
Checking account Step
Client System
Client’s Account Transaction
Currency Transaction History
Dollar
Envelope
Reviewing the class purpose
Identifying the classes that play a role in
achieving system goals and requirements is a
major activity of object oriented analysis
Every class must have a purpose and should be
clearly defined
The classes that add no purpose to the system
have been deleted from the list
The candidate classes are these
1.ATM Machine Class: Provides an interface to the
ViaNet bank
2.ATM Card Class: provides a client with a key to an
account
3.Bank Client class: a client is an individual that has a
checking account & possibly savings account
4.Bank class: bank clients belong to the bank. It is a
repository of accounts and processes the account’s
transactions
5.Account class: an account class is a formal (or
abstract) class, it defines the common behaviors that
can be inherited by more specific classes such as
checking Account and savingsAccount
6.Checking Account class: it models a clients checking
account and provides more specialized withdrawal
service
7.Savings Account Class: it models a client’s savings
account
8.Transaction Class: keeps track of transaction,
time, date, type, amount and balance
Some classes are missing form the list and others
will be eliminated or refined later
The process of identifying classes can improve
gradually through incremental process
Problem with Noun Phrase approach:
i. It depends on the completeness and
correctness of the available document, which is
rare in real life
ii. Large volume of text on system documentation
might lead to too many candidate classes
iii. Noun phrase approach can be very educational
and useful if combined with other approaches
especially with use case
Common Class Patterns Approach
 This approach is based on a knowledge base of
the common classes that have been proposed
by various researchers
 Following is the list of patterns for finding the
candidate class and object
1.Name. Concept class
Context. A concept is a particular idea or
understanding that we have of our world. when an
understanding is shared by another, it becomes a
concept
e.g.: performance is an example of concept class
object
2.Name. Events class
Context. Events classes are points in time that must be
recorded. Things happen, usually to something else
at a given date and time or as a step in an ordered
sequence. Associated with things remembered are
attributes such as who, what, when, where, how or
why.
Eg. Landing, interrupt , request and order are possible
events
3.Name. Organization class
Context. An organization class is an collection of
people, resources, facilities or groups to which the
users belong; their capabilities have a defined
mission, whose existence is largely independent of
the individuals
e.g.: an accounting department might be considered a
potential class
4.Name. People class
Context. The people class represents the different
roles users play in interacting with the application.
People carry out some function. Coad and Yourdon
say a class which is represented by a person can be
divided into two types:
(i) Those representing users of the system, such as
an operator or clerk who interacts with the
system
(ii) And those representing people who do not use
the system but about whom information is kept
by system
e.g.: Employee, client, teacher, manager
5. Name. Place class
Context. Places are physical locations that the
system must keep information about
e.g.: buildings, stores, sites, and offices are
examples of places
6.Name. Tangible things and devices class
Context. The class includes physical objects or
groups of objects that are tangible and devices
with which the application interacts
e.g.: cars – tangible things
Pressure sensors - devices
The ViaNet Bank ATM systems: Identifying Classes
by using Common Class Patterns
The bank system events classes follow
Account class: an account class is a formal (or
abstract) class. It defines the common behaviors
that can be inherited by more specific classes
such as checking Account and Savings Account
Checking Account Class: it models a client’s checking
account and provides more specialized withdrawal
service
Savings Account Class: it models a client’s savings
account
Transaction class: it keeps track of transaction, time,
date, type, amount and balance
the bank’s organization class follows Bank class:
Bank clients belong to the bank. It is a repository of
accounts and processes, the account’s transactions
The bank system people and person class Bank client
class: a client is an individual that has a checking
account and possibly a savings account
Place classes are not applicable to bank system
Tangible and device classes of bank system
ATM Machine class: it allows access to all accounts
held by a bank client.
Use-case Driven Approach: Identifying classes and
their Behavior through sequence / collaboration
Modeling
Modeling with use case is a recommended aid in
finding the objects of a system and is the technique
used by the unified approach
The process of creating sequence or collaboration
diagram is a systematic way to think about how a
use case(scenario) can take place; and it forces to
think about objects involved in the application
When building a new system, designers model the
scenarios of the way the system of business should
work
Implementation of Scenarios
At least one scenario is to be prepared for each
significantly different use-case instance
Each scenario shows a different sequence of
interaction b/w actors and the system
The process helps to understand the behavior of the
system’s objects
Sequence diagrams enables to model more specific
analysis and also assists in the design of the system
by modeling the interactions b/w objects in the
system
The ViaNet Bank ATM System: Decomposing a use-
case Scenario with a sequence Diagram: Object
Behavior Analysis
A sequence diagram represents the sequence and
interactions of a given use case or scenario
The following are the use-cases of the bank system
Deposit checking Withdraw Savings denied
Deposit savings Checking Transaction History
Invalid PIN Savings Transaction History
Withdraw checking
Withdraw more from checking
Withdraw savings
Create a sequence / collaboration diagram for the
following use case
1.Invalid PIN use card
2.Withdraw Checking use case
3.Withdraw more from checking use case
Invalid PIN use case
The activities the actor BankClient performs
 Insert ATM card
 Enter PIN number
 Remove the ATM card
diagram
Sequence diagram for withdraw Checking use case
Classes: Bank, BankClient, ATM machine, Account,
Checking Account and Savings Account
diagram
The collaboration diagram for withdraw checking
use case:
diagram
Sequence diagram for the withdraw more from
checking use case
diagram
The collaboration diagram for withdraw more from
checking use case
diagram
Classes, Responsibilities and Collaborations(CRC)
CRC is a technique used for identifying classes
responsibilities and therefore their attributes and
methods
CRC helps in identify classes
CRC is based on the idea that an object either
can accomplish a certain responsibility itself or it
may require the assistance of other objects
If it requires the assistance of other objects, it
must collaborate with those objects to fulfill its
responsibility
By identifying objects responsibility and
collaborators you can identify methods and
attributes
CRC cards are 4 power of 11 * 6 power of 11
index cards. All the information for an object is
written on a card
Class name appear in upper left-hand corner
Bulleted list of responsibility appear under it in
the left two thirds of the card
List of collaborators appear in right third
Cards are cheap, portable, readily available and
familiar
CRC stresses the importance of creating objects
not to meet mythical future needs, but only
under the demands of the moment
CRC index card
Classes, Responsibilities and Collaborators process
3 steps
1. Identify classes responsibilities(and identify
classes)
2. Assign responsibility
3. Identify collaborators
Class Name Collaborators
Responsibilities ………….………..
……………
Diagram
The ViaNet Bank ATM System: Identifying Classes
by using CRC
For Account object
Account
Balance
Number
----------
Deposit
Withdraw
get Balance
Checking Account
(sub class)
Saving Account
(subclass)
transaction
Naming classes
Guidelines
1. Class name should be singular
2. Use names in which users or clients are
comfortable
3. Name of a class should reflect its intrinsic
nature
4. Use readable names

More Related Content

Similar to Chapter 7 ooad

Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented DesignAravinth NSP
 
Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1Synapseindiappsdevelopment
 
Object oriented software engineering
Object oriented software engineeringObject oriented software engineering
Object oriented software engineeringVarsha Ajith
 
L ab # 07
L ab # 07L ab # 07
L ab # 07Mr SMAK
 
Research trends in data warehousing and data mining
Research trends in data warehousing and data miningResearch trends in data warehousing and data mining
Research trends in data warehousing and data miningEr. Nawaraj Bhandari
 
unit3-objectanalysis-classification-120310233747-phpapp01.ppt
unit3-objectanalysis-classification-120310233747-phpapp01.pptunit3-objectanalysis-classification-120310233747-phpapp01.ppt
unit3-objectanalysis-classification-120310233747-phpapp01.pptSARANYAM124686
 
UNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptxUNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptxanguraju1
 
Student Name Daniel RosadoCourseCIS339Session (month, ye.docx
Student Name Daniel RosadoCourseCIS339Session (month, ye.docxStudent Name Daniel RosadoCourseCIS339Session (month, ye.docx
Student Name Daniel RosadoCourseCIS339Session (month, ye.docxemelyvalg9
 
Lecture7 use case modeling
Lecture7 use case modelingLecture7 use case modeling
Lecture7 use case modelingShahid Riaz
 
ObjectOrientedSystems.ppt
ObjectOrientedSystems.pptObjectOrientedSystems.ppt
ObjectOrientedSystems.pptChishaleFriday
 
3_ObjectOrientedSystems.pptx
3_ObjectOrientedSystems.pptx3_ObjectOrientedSystems.pptx
3_ObjectOrientedSystems.pptxRokaKaram
 
Profile Analysis of Users in Data Analytics Domain
Profile Analysis of   Users in Data Analytics DomainProfile Analysis of   Users in Data Analytics Domain
Profile Analysis of Users in Data Analytics DomainDrjabez
 
3 stages of qualitative data analysis
3 stages of qualitative data analysis 3 stages of qualitative data analysis
3 stages of qualitative data analysis Ali Ijaz
 
A&D - Object Oriented Analysis using UML
A&D - Object Oriented Analysis using UMLA&D - Object Oriented Analysis using UML
A&D - Object Oriented Analysis using UMLvinay arora
 
use_case+use_case description.pptx
use_case+use_case description.pptxuse_case+use_case description.pptx
use_case+use_case description.pptxAqeelAbbas94
 

Similar to Chapter 7 ooad (20)

Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1
 
Object oriented software engineering
Object oriented software engineeringObject oriented software engineering
Object oriented software engineering
 
L ab # 07
L ab # 07L ab # 07
L ab # 07
 
Research trends in data warehousing and data mining
Research trends in data warehousing and data miningResearch trends in data warehousing and data mining
Research trends in data warehousing and data mining
 
unit3-objectanalysis-classification-120310233747-phpapp01.ppt
unit3-objectanalysis-classification-120310233747-phpapp01.pptunit3-objectanalysis-classification-120310233747-phpapp01.ppt
unit3-objectanalysis-classification-120310233747-phpapp01.ppt
 
Chapter 8 ooad
Chapter  8 ooadChapter  8 ooad
Chapter 8 ooad
 
inheritance and polymorphism
inheritance and polymorphisminheritance and polymorphism
inheritance and polymorphism
 
2b writing good use cases
2b writing good use cases2b writing good use cases
2b writing good use cases
 
UNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptxUNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptx
 
Student Name Daniel RosadoCourseCIS339Session (month, ye.docx
Student Name Daniel RosadoCourseCIS339Session (month, ye.docxStudent Name Daniel RosadoCourseCIS339Session (month, ye.docx
Student Name Daniel RosadoCourseCIS339Session (month, ye.docx
 
Lecture7 use case modeling
Lecture7 use case modelingLecture7 use case modeling
Lecture7 use case modeling
 
ObjectOrientedSystems.ppt
ObjectOrientedSystems.pptObjectOrientedSystems.ppt
ObjectOrientedSystems.ppt
 
3_ObjectOrientedSystems.pptx
3_ObjectOrientedSystems.pptx3_ObjectOrientedSystems.pptx
3_ObjectOrientedSystems.pptx
 
Profile Analysis of Users in Data Analytics Domain
Profile Analysis of   Users in Data Analytics DomainProfile Analysis of   Users in Data Analytics Domain
Profile Analysis of Users in Data Analytics Domain
 
3 stages of qualitative data analysis
3 stages of qualitative data analysis 3 stages of qualitative data analysis
3 stages of qualitative data analysis
 
A&D - Object Oriented Analysis using UML
A&D - Object Oriented Analysis using UMLA&D - Object Oriented Analysis using UML
A&D - Object Oriented Analysis using UML
 
use_case+use_case description.pptx
use_case+use_case description.pptxuse_case+use_case description.pptx
use_case+use_case description.pptx
 
Unit-2.pptx
Unit-2.pptxUnit-2.pptx
Unit-2.pptx
 

More from anujabeatrice2 (6)

Ooad ch 5
Ooad ch 5Ooad ch 5
Ooad ch 5
 
Ooad ch 4
Ooad ch 4Ooad ch 4
Ooad ch 4
 
Ooad ch 3
Ooad ch 3Ooad ch 3
Ooad ch 3
 
Ooad ch 2
Ooad ch 2Ooad ch 2
Ooad ch 2
 
Ooad ch 1_2
Ooad ch 1_2Ooad ch 1_2
Ooad ch 1_2
 
Ooad ch 6
Ooad ch 6Ooad ch 6
Ooad ch 6
 

Recently uploaded

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 

Recently uploaded (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

Chapter 7 ooad

  • 1. Chapter – 7 Object Analysis: Classification Classification theory Classification, the process of checking to see if an object belongs to a category or a class, is regarded as a basic attribute of human nature Classes are an important mechanism for classifying objects. The chief role of a class is to define the attributes, methods and applicability of its instances. The class car e.g.: defines the property color. Each individual car will have a value for this property such as yellow or white Objects have properties(attributes) and methods(behavior)
  • 2. A class is a specification of structure, behavior and the description of an object Classification is concerned more with identifying the class of an object than the individual objects within a system  classes are important because they create conceptual building blocks for designing systems An object can be categorized in more than one way The problem of classification may be regarded as one of discriminating things, not between the individual objects but between classes, via the search for features or invariant attributes or behaviors among members of a class
  • 3. 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 irrelevant detail Approach for identifying classes Four approaches 1.The noun phrase approach 2.The common class patterns approach 3.The use-case driven, sequence/collaboration modeling approach 4.The classes, responsibilities and collaborators (CRC) approach
  • 4. Noun Phrase Approach In this method, you read through the requirements or use looking for noun phrases Nouns in the textual description are considered to be classes and verbs to be methods of the classes All plurals are changed to singular, the nouns are listed and list is divided into 3 categories 1.relevant classes 2.fuzzy classes (those classes that we are not sure about) 3.irrelevant classes
  • 5. •Diagram It is safe to scrap the irrelevant classes, which either have no purpose or will be unnecessary Candidate classes then are selected from the other two categories Identifying classes and developing a UML class diagram just like other activities is an iterative process
  • 6. Identifying Tentative Classes Guidelines for selecting classes in an application 1. Look for nouns and noun phrases in the use cases 2. Some classes are implicit or taken form general knowledge 3. All classes must make sense in the application domain; avoid computer implementation classes 4. Carefully choose and define class names Finding classes in an incremental and iterative process
  • 7. Selecting Classes form the Relevant and Fuzzy Categories: Guidelines in selecting candidate classes from the relevant and fuzzy categories of classes in the problem domain 1. Redundant Classes  Do not keep two classes that express the same information  If more than one word is being used to describe the same idea, select the one that is the most meaningful in the context of the system  Choose your vocabulary carefully; use the word that is being used by the user of the system
  • 8. 2.Adjective classes An adjective can suggest a different kind of object, different use of the same object or it could be utterly irrelevant. Does the object represented by the noun behave differently when the adjective is applied to it ? 3.Attribute classes Tentative objects that are used only as values should be defined or restated as attributes and not as a class 4.Irrelevant classes Each class must have a purpose and every class should be clearly defined and necessary
  • 9. The process of identifying relevant classes and eliminating irrelevant classes is an incremental process Each iteration often uncovers some classes that have been overlooked Classification is the essence of good object- oriented analysis and design The process of eliminating the redundant classes and refining the remaining classes is not sequential
  • 10. The ViaNet Bank ATM System: Identifying Classes by using Noun Phrase Approach Initial List of Noun Phrases: Candidate Classes Initial study of the use cases of bank system products the following noun phrase (candidate classes – may be) Account Dollar Transaction Account balance Envelope Transaction History Amount Four Digit Approval process Fund
  • 11. ATM card Invalid PIN ATM machine Message Bank Money Bank Client Password Card PIN Cash PIN code Checking Record Checking account Savings Client Savings Account Client’s Account Step Currency System
  • 12. Eliminate the irrelevant classes. Candidate classes must be selected from relevant and fuzzy classes. The following irrelevant classes can be eliminated because they do not belong to the problem statement: Envelope, Four Digits and step. Strike outs indicate eliminate classes Account Envelope Account balance Four Digits Amount Fund Approval process Invalid PIN ATM card Message ATM machine Money Bank Password
  • 13. Bank client PIN Card PIN code Cash Record Check Savings Checking account Savings account Checking Step Client System Client’s account Transaction Currency Transaction History Dollar
  • 14. Reviewing the redundant classes and building a common vocabulary If different words are being used to describe the same idea, select the one that is the most meaningful in the context of the system and eliminate the others The following are the different class names that are being used to refer to the same concept Client, BankClient = Bank Client(the term chosen) Account, Client’sAccount = Account PIN, PIN code = PIN Checking, Checking Account = Checking Account Savings, Savings Account = Savings Account Fund, Money = Fund ATM Card, Card = ATM Card
  • 15. Revised list of candidate classes Account Envelope Account Balance Four Digit Amount Fund Approval Process Invalid PIN ATM card Message Bank Money Bank client Password Card PIN Cash PIN Code Check, checking Savings Checking Account Savings Account Client Step Client’s Account System Currency Transaction Dollar Transaction History
  • 16. Reviewing the Classes Containing Adjectives Question – Does the object represented by the noun behave differently when the adjective is applied to it? If an adjective suggests a different kind of class or the class represented by the noun behaves differently when the adjective is applied to it, then we need to make a new class If it is a different use of the same object or the class is irrelevant, we must eliminate it In the above e.g.: no elimination
  • 17. Reviewing the Possible Attributes Identify the noun phrases that are attributes, not classes The noun phrases used only as values should be restated as attributes Amount – a value, not a class Account Balance : an attribute of the Account class Invalid PIN : it is only a value, not a class Password : an attribute, possibly of Transaction class PIN: an attribute, possibly of the BankClient class
  • 18. Revised list of candidate classes Account Four Digits Account balance Fund Amount Invalid PIN Approval process Message ATM card Money Bank Password Bank Client PIN Card PIN Code Cash Record Check Savings Checking Savings Account Checking account Step Client System Client’s Account Transaction Currency Transaction History Dollar Envelope
  • 19. Reviewing the class purpose Identifying the classes that play a role in achieving system goals and requirements is a major activity of object oriented analysis Every class must have a purpose and should be clearly defined The classes that add no purpose to the system have been deleted from the list The candidate classes are these 1.ATM Machine Class: Provides an interface to the ViaNet bank
  • 20. 2.ATM Card Class: provides a client with a key to an account 3.Bank Client class: a client is an individual that has a checking account & possibly savings account 4.Bank class: bank clients belong to the bank. It is a repository of accounts and processes the account’s transactions 5.Account class: an account class is a formal (or abstract) class, it defines the common behaviors that can be inherited by more specific classes such as checking Account and savingsAccount 6.Checking Account class: it models a clients checking account and provides more specialized withdrawal service
  • 21. 7.Savings Account Class: it models a client’s savings account 8.Transaction Class: keeps track of transaction, time, date, type, amount and balance Some classes are missing form the list and others will be eliminated or refined later The process of identifying classes can improve gradually through incremental process Problem with Noun Phrase approach: i. It depends on the completeness and correctness of the available document, which is rare in real life
  • 22. ii. Large volume of text on system documentation might lead to too many candidate classes iii. Noun phrase approach can be very educational and useful if combined with other approaches especially with use case Common Class Patterns Approach  This approach is based on a knowledge base of the common classes that have been proposed by various researchers  Following is the list of patterns for finding the candidate class and object
  • 23. 1.Name. Concept class Context. A concept is a particular idea or understanding that we have of our world. when an understanding is shared by another, it becomes a concept e.g.: performance is an example of concept class object 2.Name. Events class Context. Events classes are points in time that must be recorded. Things happen, usually to something else at a given date and time or as a step in an ordered sequence. Associated with things remembered are attributes such as who, what, when, where, how or why. Eg. Landing, interrupt , request and order are possible events
  • 24. 3.Name. Organization class Context. An organization class is an collection of people, resources, facilities or groups to which the users belong; their capabilities have a defined mission, whose existence is largely independent of the individuals e.g.: an accounting department might be considered a potential class 4.Name. People class Context. The people class represents the different roles users play in interacting with the application. People carry out some function. Coad and Yourdon say a class which is represented by a person can be divided into two types:
  • 25. (i) Those representing users of the system, such as an operator or clerk who interacts with the system (ii) And those representing people who do not use the system but about whom information is kept by system e.g.: Employee, client, teacher, manager 5. Name. Place class Context. Places are physical locations that the system must keep information about e.g.: buildings, stores, sites, and offices are examples of places
  • 26. 6.Name. Tangible things and devices class Context. The class includes physical objects or groups of objects that are tangible and devices with which the application interacts e.g.: cars – tangible things Pressure sensors - devices The ViaNet Bank ATM systems: Identifying Classes by using Common Class Patterns The bank system events classes follow Account class: an account class is a formal (or abstract) class. It defines the common behaviors that can be inherited by more specific classes such as checking Account and Savings Account
  • 27. Checking Account Class: it models a client’s checking account and provides more specialized withdrawal service Savings Account Class: it models a client’s savings account Transaction class: it keeps track of transaction, time, date, type, amount and balance the bank’s organization class follows Bank class: Bank clients belong to the bank. It is a repository of accounts and processes, the account’s transactions The bank system people and person class Bank client class: a client is an individual that has a checking account and possibly a savings account
  • 28. Place classes are not applicable to bank system Tangible and device classes of bank system ATM Machine class: it allows access to all accounts held by a bank client. Use-case Driven Approach: Identifying classes and their Behavior through sequence / collaboration Modeling Modeling with use case is a recommended aid in finding the objects of a system and is the technique used by the unified approach The process of creating sequence or collaboration diagram is a systematic way to think about how a use case(scenario) can take place; and it forces to think about objects involved in the application
  • 29. When building a new system, designers model the scenarios of the way the system of business should work Implementation of Scenarios At least one scenario is to be prepared for each significantly different use-case instance Each scenario shows a different sequence of interaction b/w actors and the system The process helps to understand the behavior of the system’s objects Sequence diagrams enables to model more specific analysis and also assists in the design of the system by modeling the interactions b/w objects in the system
  • 30. The ViaNet Bank ATM System: Decomposing a use- case Scenario with a sequence Diagram: Object Behavior Analysis A sequence diagram represents the sequence and interactions of a given use case or scenario The following are the use-cases of the bank system Deposit checking Withdraw Savings denied Deposit savings Checking Transaction History Invalid PIN Savings Transaction History Withdraw checking Withdraw more from checking Withdraw savings
  • 31. Create a sequence / collaboration diagram for the following use case 1.Invalid PIN use card 2.Withdraw Checking use case 3.Withdraw more from checking use case Invalid PIN use case The activities the actor BankClient performs  Insert ATM card  Enter PIN number  Remove the ATM card
  • 33. Sequence diagram for withdraw Checking use case Classes: Bank, BankClient, ATM machine, Account, Checking Account and Savings Account diagram
  • 34. The collaboration diagram for withdraw checking use case: diagram
  • 35. Sequence diagram for the withdraw more from checking use case diagram
  • 36. The collaboration diagram for withdraw more from checking use case diagram
  • 37. Classes, Responsibilities and Collaborations(CRC) CRC is a technique used for identifying classes responsibilities and therefore their attributes and methods CRC helps in identify classes CRC is based on the idea that an object either can accomplish a certain responsibility itself or it may require the assistance of other objects If it requires the assistance of other objects, it must collaborate with those objects to fulfill its responsibility By identifying objects responsibility and collaborators you can identify methods and attributes
  • 38. CRC cards are 4 power of 11 * 6 power of 11 index cards. All the information for an object is written on a card Class name appear in upper left-hand corner Bulleted list of responsibility appear under it in the left two thirds of the card List of collaborators appear in right third Cards are cheap, portable, readily available and familiar CRC stresses the importance of creating objects not to meet mythical future needs, but only under the demands of the moment
  • 39. CRC index card Classes, Responsibilities and Collaborators process 3 steps 1. Identify classes responsibilities(and identify classes) 2. Assign responsibility 3. Identify collaborators Class Name Collaborators Responsibilities ………….……….. ……………
  • 41. The ViaNet Bank ATM System: Identifying Classes by using CRC For Account object Account Balance Number ---------- Deposit Withdraw get Balance Checking Account (sub class) Saving Account (subclass) transaction
  • 42. Naming classes Guidelines 1. Class name should be singular 2. Use names in which users or clients are comfortable 3. Name of a class should reflect its intrinsic nature 4. Use readable names