Download - Unit 3 object analysis-classification
![Page 1: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/1.jpg)
Object Analysis
classification
![Page 2: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/2.jpg)
Classification theory
• Process of checking to see if an object belongs to a category or a class
![Page 3: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/3.jpg)
Approaches for identifying classes
1. Noun phrase approach
2. Common class patterns approach
3. Use case driven ,sequence/collaboration approach
4. Classes, responsibilities and Collaborators (CRC) approach
![Page 4: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/4.jpg)
Noun phrase approach
• Identify Noun phrases from requirements or use cases
• Nouns - classes• Verbs - methods• All plurals singular• Create a List of nouns
– Divided into 3 categories• Relevant classes• Fuzzy classes• Irrelevant classes
Candidate classes
Removed safely
![Page 5: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/5.jpg)
cont…
• Identifying tentative classes
• Guidelines– Look for nouns and noun phrases in the use
case– Some classes are implicit and taken from
knowledge– Avoid computer implementation classes (defer
them to design phase). application domain related classes makes sense
– Carefully choose and define class name
![Page 6: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/6.jpg)
• Redundant classes– Avoid– Choose more meaningful name and name used by user
• Adjective classes– Adjective can suggest
• Different kind of object• Different use of same object• Utterly irrelevant
eg: adult member and youth member• Attribute classes
– Objects used only as value can be treated as attribute instead of classes
• Irrelevant classes– Relevant class have statement of purpose.– Irrelevant classes - have no statement of purpose
Guidelines :Selecting classes from relevant and fuzzy category
![Page 7: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/7.jpg)
• Account• Account balance• Amount• Approval process• Atm card• Atm machine• Bank• Bank client• Card• Cash• Check• Checking• Checking
account
• Client• Client’s
account• Currency• Dollar• Envelope• Four digits• Fund• Invalid pin• Message• Money• Password• PIN• Pin code
• Record• Savings• Savings
account• Step• System• Transaction• transaction
history
Initial list of noun classes : in vianet bank
![Page 8: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/8.jpg)
• Account• Account balance• Amount• Approval process• Atm card• Atm machine• Bank• Bank client• Card• Cash• Check• Checking• Checking
account
• Client• Client’s
account• Currency• Dollar• Envelope• Four digits• Fund• Invalid pin• Message• Money• Password• PIN• Pin code
• Record• Savings• Savings
account• Step• System• Transaction• transaction
history
Removing irrelevant classes
![Page 9: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/9.jpg)
• Account• Account balance• Amount• Approval process• Atm card• Atm machine• Bank• Bank client• Card• Cash• Check• Checking• Checking
account
• Client• Client’s
account• Currency• Dollar• Envelope• Four digits• Fund• Invalid pin• Message• Money• Password• PIN• Pin code
• Record• Savings• Savings
account• Step• System• Transaction• transaction
history
Removing redundant classe and building common vocabulary
![Page 10: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/10.jpg)
Reviewing the classes containing adjectives
• When class represented by noun behaves differently when adjective is applied to it, then separate class has to be created
• In this ex no such classes
![Page 11: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/11.jpg)
Reviewing the possible attributes
• Noun phrases used only as values should be treated as attributes
![Page 12: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/12.jpg)
• Account• Account balance• Amount• Approval process• Atm card• Atm machine• Bank• Bank client• Card• Cash• Check• Checking• Checking
account
• Client• Client’s
account• Currency• Dollar• Envelope• Four digits• Fund• Invalid pin• Message• Money• Password• PIN• Pin code
• Record• Savings• Savings
account• Step• System• Transaction• transaction
history
Reviewing possible attributes
![Page 13: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/13.jpg)
Reviewing the class purpose
• Include classes with– Purpose– Clear definition – Necessary in achieving system goal
• Eliminate classes with no purpose• Ex: Candidate class with purpose are
– ATM machine class– ATM card class– Bankclient class– Bank class– Account class– Checking account class– Saving account class– Transaction class
![Page 14: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/14.jpg)
Common class pattern approach• Based on knowledge base of the common classes ,• proposed by researchers like shlaer and mellor• Patterns for finding class and object
– Concept class• Particular idea or understanding
– Ex: performance
– Event class• Are points in time tat must be recorded• Ex : account, request, order
– Organization class• Collection of people, resources, facilities or groups to which the user belongs• Ex : account dept,bank
– People class• Represents different roles user plays in interacting with the system.• Ex : bank client
– Places class• Physical location that the system must keep inform about• Ex :
– Tangible things and devices• Includes physical objects or group of objects• Ex : atmmachine
![Page 15: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/15.jpg)
Use case driven approach
• Identifying classes and their usage through sequence collaboration modelling
![Page 16: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/16.jpg)
• Recommended approach• Problem driven approach
– Prob is considered 1st. Not the relationship bw objects (like in data driven approach)
• Atleast one senario be prepared for each significantly different use case instance
• Use case diag – high level view of the system• Sequence diag – interaction among objects
– By walking through the steps, we can determine what objects necessary for those steps to take place
![Page 17: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/17.jpg)
client atmmachine Bank client
Insert atm card
Request pin
Enter pin number
Verify pin number
Bad pin numberBad pin number
![Page 18: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/18.jpg)
Classes , Responsibilities, and Collaborators
• Classes ,responsibilities, collaborators– Leads to identifying its attributes and methods
• CRC index card– 4” * 6” card– Cheap, portable, readily available, familiar– Contains all information
Class name
Responsibilities in bullet format
Collaborators
![Page 19: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/19.jpg)
CRC process
• 3 steps
Identify classes
responsibility(and identify
classes)
Assign responsibiliti
es
Identify collaborators
iterate
![Page 20: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/20.jpg)
Atm system
Account
Balance
Number
Checking account
(sub class)
Saving account
(sub class)Withdraw
Deposit
getbalance
![Page 21: Unit 3 object analysis-classification](https://reader033.vdocuments.mx/reader033/viewer/2022061222/54c2ed2e4a795990308b45e1/html5/thumbnails/21.jpg)
Guidelines: Naming class
• Singular
• Use standard vocabulary
• Reflect its intrinsic feature
• Readable names