SlideShare a Scribd company logo
1 of 11
Presented By
Babak Danyal
•Larman introduces a set of basic patterns that he calls
GRASP: General Responsibility Assignment Software
Pattern
•Five GRASP Patterns:
–Information Expert
–Creator
–High Cohesion
–Low Coupling
–Controller
Problem:A system will have hundreds of classes. How do I
begin to assign responsibilities to them?
Solution:Assign responsibility to the Information Expert–the
class that has the information necessary to fulfill the
responsibility.
Mechanics:
Step 1: Clearly state the responsibility
Step 2: Look for classes that have the information we need to
fulfill the responsibility.
Step 3:Domain Model or Design Model?
Step 4:Sketch out some interaction diagrams.
Step 5:Update the class diagram.
:L ib r a r y
b o r r o w R e s o u r c e (c a llN u m )
1 : r := g e tR e s o u r c e (c a llN u m ): R e s o u r c e
:C a ta lo g
C a ta lo g is a n in fo r m a tio n e x p e r t o n
fin d in g a n d r e tu r n in g a r e s o u r c e ,
b a s e d o n a c a ll n u m b e r . It lo g ic a lly
c o n ta in s a ll o f th e m .
b y E x p e r t
W h a t c la s s s h o u ld b e r e s p o n s ib le fo r
k n o w in g a r e s o u r c e , g iv e n a c a ll n u m b e r ?
Problem:
Who creates new instances of some class?
Solution:
Let class A create an instance of class B if….
•A aggregates(whole-part relationship) B objects
•A contains B objects
•A records instances of B objects
•A closely uses B objects
•A has initialization data that is needed when creating B
objects.
Mechanics:
Step 1: Look at Domain / Design model and ask: “Who should
be creating these classes”?
Step 2:Look for classes that create, aggregate, etc.
Step 3:Sketch or update interaction / class diagrams.
:C a ta lo g
m a k e B o o k (title )
1 : c re a te (title )
:B o o k
b y C r e a to r
Problem:
How do you support low dependency, low change impact, and
increased reuse.
Solution:
Assign responsibility so responsibility remains low.
Mechanics:
Look for classes with many associations to other classes.
Look for a methods that rely on a lot of other methods (or methods in
other classes, I.e. dependencies.
Rework your design as needed.
Problem:
How do you keep complexity manageable?
Solution:
Assign responsibility so that cohesion remains high.
Mechanics:
Look for classes with too-few or disconnected methods.
Look for methods that do to much (hint: method name)
Rework your design as needed.
Problem:
Who handles events from external actors, e.g. startup(),
playSongs(), etc?
Solution:
Assign the responsibility to a controller class, such as:
•A class that represents the overall system, device, or
subsystem. Example: Jukebox.
•A class that represents a use case. Example: makeSaleHandler.
makeSaleCoordinator, etc.
•These classes often don’t do the work, but delegate it to
others.
re c o rd B o rro w e r(lib ID )
:S y s te m
b o rro w R e s o u rc e (c a llN u m )
p rin tB o rro w R e p o rt()
L ib ra ria n
?
p rin tB o rro w R e p o rt() . . .
?
b o rro w R e s o u rc e (c a llN u m ) . . .
?
re c o rd B o rro w e r(lib ID ) . . .
C o n tra c t:
re c o rd B o rro w e r
...
P o s tc o n d itio n s :
...
C o n tra c t:
b o rro w R e s o u rc e
...
P o s tc o n d itio n s :
...
C o n tra c t:
p rin tB o rro w R e p o rt
...
P o s tc o n d itio n s :
...
U s e C a s e : B o rro w R e s o u rc e s
T h is u s e c a s e b e g in s ...
...
Final grasp ASE

More Related Content

What's hot

Responsibility Driven Design
Responsibility Driven DesignResponsibility Driven Design
Responsibility Driven DesignHarsh Jegadeesan
 
Grasp patterns and its types
Grasp patterns and its typesGrasp patterns and its types
Grasp patterns and its typesSyed Hassan Ali
 
Refactoring for Software Design Smells
Refactoring for Software Design SmellsRefactoring for Software Design Smells
Refactoring for Software Design SmellsGanesh Samarthyam
 
Design poo my_jug_en_ppt
Design poo my_jug_en_pptDesign poo my_jug_en_ppt
Design poo my_jug_en_pptagnes_crepet
 
Software design principles
Software design principlesSoftware design principles
Software design principlesMd.Mojibul Hoque
 
Software design principles for evolving architectures
Software design principles for evolving architecturesSoftware design principles for evolving architectures
Software design principles for evolving architecturesFirat Atagun
 
Introduction to design patterns
Introduction to design patternsIntroduction to design patterns
Introduction to design patternsAmit Kabra
 
Six Principles of Software Design to Empower Scientists
Six Principles of Software Design to Empower ScientistsSix Principles of Software Design to Empower Scientists
Six Principles of Software Design to Empower ScientistsDavid De Roure
 
NoSQL Introduction, Theory, Implementations
NoSQL Introduction, Theory, ImplementationsNoSQL Introduction, Theory, Implementations
NoSQL Introduction, Theory, ImplementationsFirat Atagun
 
Troubleshooting Deep Neural Networks - Full Stack Deep Learning
Troubleshooting Deep Neural Networks - Full Stack Deep LearningTroubleshooting Deep Neural Networks - Full Stack Deep Learning
Troubleshooting Deep Neural Networks - Full Stack Deep LearningSergey Karayev
 
Object-Oriented Design Heuristics
Object-Oriented Design HeuristicsObject-Oriented Design Heuristics
Object-Oriented Design Heuristicskim.mens
 
PATTERNS05 - Guidelines for Choosing a Design Pattern
PATTERNS05 - Guidelines for Choosing a Design PatternPATTERNS05 - Guidelines for Choosing a Design Pattern
PATTERNS05 - Guidelines for Choosing a Design PatternMichael Heron
 
Software Design Principles
Software Design PrinciplesSoftware Design Principles
Software Design PrinciplesOcean Dong
 
Is there a future for Model Transformation Languages?
Is there a future for Model Transformation Languages?Is there a future for Model Transformation Languages?
Is there a future for Model Transformation Languages?Jordi Cabot
 
Cohesion and Coupling - The Keys To Changing Your Code With Confidence
Cohesion and Coupling - The Keys To Changing Your Code With ConfidenceCohesion and Coupling - The Keys To Changing Your Code With Confidence
Cohesion and Coupling - The Keys To Changing Your Code With ConfidenceDan Donahue
 
Cqrs and Event Sourcing Intro For Developers
Cqrs and Event Sourcing Intro For DevelopersCqrs and Event Sourcing Intro For Developers
Cqrs and Event Sourcing Intro For Developerswojtek_s
 
Patterns of Assigning Responsibilities
Patterns of Assigning ResponsibilitiesPatterns of Assigning Responsibilities
Patterns of Assigning Responsibilitiesguest2a92cd9
 

What's hot (19)

Responsibility Driven Design
Responsibility Driven DesignResponsibility Driven Design
Responsibility Driven Design
 
Grasp patterns and its types
Grasp patterns and its typesGrasp patterns and its types
Grasp patterns and its types
 
Refactoring for Software Design Smells
Refactoring for Software Design SmellsRefactoring for Software Design Smells
Refactoring for Software Design Smells
 
Design poo my_jug_en_ppt
Design poo my_jug_en_pptDesign poo my_jug_en_ppt
Design poo my_jug_en_ppt
 
Software design principles
Software design principlesSoftware design principles
Software design principles
 
Software design principles for evolving architectures
Software design principles for evolving architecturesSoftware design principles for evolving architectures
Software design principles for evolving architectures
 
Introduction to design patterns
Introduction to design patternsIntroduction to design patterns
Introduction to design patterns
 
Six Principles of Software Design to Empower Scientists
Six Principles of Software Design to Empower ScientistsSix Principles of Software Design to Empower Scientists
Six Principles of Software Design to Empower Scientists
 
NoSQL Introduction, Theory, Implementations
NoSQL Introduction, Theory, ImplementationsNoSQL Introduction, Theory, Implementations
NoSQL Introduction, Theory, Implementations
 
Troubleshooting Deep Neural Networks - Full Stack Deep Learning
Troubleshooting Deep Neural Networks - Full Stack Deep LearningTroubleshooting Deep Neural Networks - Full Stack Deep Learning
Troubleshooting Deep Neural Networks - Full Stack Deep Learning
 
Object-Oriented Design Heuristics
Object-Oriented Design HeuristicsObject-Oriented Design Heuristics
Object-Oriented Design Heuristics
 
PATTERNS05 - Guidelines for Choosing a Design Pattern
PATTERNS05 - Guidelines for Choosing a Design PatternPATTERNS05 - Guidelines for Choosing a Design Pattern
PATTERNS05 - Guidelines for Choosing a Design Pattern
 
Clean code-v2.2
Clean code-v2.2Clean code-v2.2
Clean code-v2.2
 
Opposites Attract
Opposites AttractOpposites Attract
Opposites Attract
 
Software Design Principles
Software Design PrinciplesSoftware Design Principles
Software Design Principles
 
Is there a future for Model Transformation Languages?
Is there a future for Model Transformation Languages?Is there a future for Model Transformation Languages?
Is there a future for Model Transformation Languages?
 
Cohesion and Coupling - The Keys To Changing Your Code With Confidence
Cohesion and Coupling - The Keys To Changing Your Code With ConfidenceCohesion and Coupling - The Keys To Changing Your Code With Confidence
Cohesion and Coupling - The Keys To Changing Your Code With Confidence
 
Cqrs and Event Sourcing Intro For Developers
Cqrs and Event Sourcing Intro For DevelopersCqrs and Event Sourcing Intro For Developers
Cqrs and Event Sourcing Intro For Developers
 
Patterns of Assigning Responsibilities
Patterns of Assigning ResponsibilitiesPatterns of Assigning Responsibilities
Patterns of Assigning Responsibilities
 

Similar to Final grasp ASE

MLlecture1.ppt
MLlecture1.pptMLlecture1.ppt
MLlecture1.pptbutest
 
MLlecture1.ppt
MLlecture1.pptMLlecture1.ppt
MLlecture1.pptbutest
 
clean architecture uncle bob AnalysisAndDesign.el.en.pptx
clean architecture uncle bob AnalysisAndDesign.el.en.pptxclean architecture uncle bob AnalysisAndDesign.el.en.pptx
clean architecture uncle bob AnalysisAndDesign.el.en.pptxsaber tabatabaee
 
Fostering Systems Thinking in Your Students
Fostering Systems Thinking in Your StudentsFostering Systems Thinking in Your Students
Fostering Systems Thinking in Your StudentsSERC at Carleton College
 
Object Oriented Software Development revision slide
Object Oriented Software Development revision slide Object Oriented Software Development revision slide
Object Oriented Software Development revision slide fauza jali
 
Extracting Relevant Questions to an RDF Dataset Using Formal Concept Analysis
Extracting Relevant Questions to an RDF Dataset Using Formal Concept AnalysisExtracting Relevant Questions to an RDF Dataset Using Formal Concept Analysis
Extracting Relevant Questions to an RDF Dataset Using Formal Concept AnalysisMathieu d'Aquin
 
Object oriented analysis_and_design_v2.0
Object oriented analysis_and_design_v2.0Object oriented analysis_and_design_v2.0
Object oriented analysis_and_design_v2.0Ganapathi M
 
K-12 Computer Science Framework GaDOE Update
K-12 Computer Science Framework GaDOE UpdateK-12 Computer Science Framework GaDOE Update
K-12 Computer Science Framework GaDOE UpdateTony Vlachakis
 
Devry CIS 247 Full Course Latest
Devry CIS 247 Full Course LatestDevry CIS 247 Full Course Latest
Devry CIS 247 Full Course LatestAtifkhilji
 
12266422.ppt
12266422.ppt12266422.ppt
12266422.pptCSEC5
 
Assume that four mineral water producers compete in prices in a Be.docx
Assume that four mineral water producers compete in prices in a Be.docxAssume that four mineral water producers compete in prices in a Be.docx
Assume that four mineral water producers compete in prices in a Be.docxssuser562afc1
 
Hi Navish,Here I attached the feedback form. I personally feel.docx
Hi Navish,Here I attached the feedback form. I personally feel.docxHi Navish,Here I attached the feedback form. I personally feel.docx
Hi Navish,Here I attached the feedback form. I personally feel.docxpooleavelina
 
Git Makes Me Angry Inside - DrupalCon Prague
Git Makes Me Angry Inside - DrupalCon PragueGit Makes Me Angry Inside - DrupalCon Prague
Git Makes Me Angry Inside - DrupalCon PragueEmma Jane Hogbin Westby
 
se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_
se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_
se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_WilheminaRossi174
 
mlrev.ppt
mlrev.pptmlrev.ppt
mlrev.pptbutest
 
Cis336 (introduction to database w lab – oracle) complete class
Cis336 (introduction to database w lab – oracle) complete classCis336 (introduction to database w lab – oracle) complete class
Cis336 (introduction to database w lab – oracle) complete classWalter Bartlett
 

Similar to Final grasp ASE (20)

MLlecture1.ppt
MLlecture1.pptMLlecture1.ppt
MLlecture1.ppt
 
MLlecture1.ppt
MLlecture1.pptMLlecture1.ppt
MLlecture1.ppt
 
clean architecture uncle bob AnalysisAndDesign.el.en.pptx
clean architecture uncle bob AnalysisAndDesign.el.en.pptxclean architecture uncle bob AnalysisAndDesign.el.en.pptx
clean architecture uncle bob AnalysisAndDesign.el.en.pptx
 
Fostering Systems Thinking in Your Students
Fostering Systems Thinking in Your StudentsFostering Systems Thinking in Your Students
Fostering Systems Thinking in Your Students
 
Object Oriented Software Development revision slide
Object Oriented Software Development revision slide Object Oriented Software Development revision slide
Object Oriented Software Development revision slide
 
Extracting Relevant Questions to an RDF Dataset Using Formal Concept Analysis
Extracting Relevant Questions to an RDF Dataset Using Formal Concept AnalysisExtracting Relevant Questions to an RDF Dataset Using Formal Concept Analysis
Extracting Relevant Questions to an RDF Dataset Using Formal Concept Analysis
 
Object oriented analysis_and_design_v2.0
Object oriented analysis_and_design_v2.0Object oriented analysis_and_design_v2.0
Object oriented analysis_and_design_v2.0
 
K-12 Computer Science Framework GaDOE Update
K-12 Computer Science Framework GaDOE UpdateK-12 Computer Science Framework GaDOE Update
K-12 Computer Science Framework GaDOE Update
 
CS8592-OOAD Lecture Notes Unit-4
CS8592-OOAD Lecture Notes Unit-4CS8592-OOAD Lecture Notes Unit-4
CS8592-OOAD Lecture Notes Unit-4
 
Devry CIS 247 Full Course Latest
Devry CIS 247 Full Course LatestDevry CIS 247 Full Course Latest
Devry CIS 247 Full Course Latest
 
Unit 4
Unit 4Unit 4
Unit 4
 
12266422.ppt
12266422.ppt12266422.ppt
12266422.ppt
 
Assume that four mineral water producers compete in prices in a Be.docx
Assume that four mineral water producers compete in prices in a Be.docxAssume that four mineral water producers compete in prices in a Be.docx
Assume that four mineral water producers compete in prices in a Be.docx
 
Hi Navish,Here I attached the feedback form. I personally feel.docx
Hi Navish,Here I attached the feedback form. I personally feel.docxHi Navish,Here I attached the feedback form. I personally feel.docx
Hi Navish,Here I attached the feedback form. I personally feel.docx
 
Git Makes Me Angry Inside - DrupalCon Prague
Git Makes Me Angry Inside - DrupalCon PragueGit Makes Me Angry Inside - DrupalCon Prague
Git Makes Me Angry Inside - DrupalCon Prague
 
se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_
se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_
se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_
 
Oop principles
Oop principlesOop principles
Oop principles
 
mlrev.ppt
mlrev.pptmlrev.ppt
mlrev.ppt
 
Problem solving
Problem solvingProblem solving
Problem solving
 
Cis336 (introduction to database w lab – oracle) complete class
Cis336 (introduction to database w lab – oracle) complete classCis336 (introduction to database w lab – oracle) complete class
Cis336 (introduction to database w lab – oracle) complete class
 

More from babak danyal

Easy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client SocketsEasy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client Socketsbabak danyal
 
Java IO Package and Streams
Java IO Package and StreamsJava IO Package and Streams
Java IO Package and Streamsbabak danyal
 
Swing and Graphical User Interface in Java
Swing and Graphical User Interface in JavaSwing and Graphical User Interface in Java
Swing and Graphical User Interface in Javababak danyal
 
block ciphers and the des
block ciphers and the desblock ciphers and the des
block ciphers and the desbabak danyal
 
key distribution in network security
key distribution in network securitykey distribution in network security
key distribution in network securitybabak danyal
 
Lecture10 Signal and Systems
Lecture10 Signal and SystemsLecture10 Signal and Systems
Lecture10 Signal and Systemsbabak danyal
 
Lecture8 Signal and Systems
Lecture8 Signal and SystemsLecture8 Signal and Systems
Lecture8 Signal and Systemsbabak danyal
 
Lecture7 Signal and Systems
Lecture7 Signal and SystemsLecture7 Signal and Systems
Lecture7 Signal and Systemsbabak danyal
 
Lecture6 Signal and Systems
Lecture6 Signal and SystemsLecture6 Signal and Systems
Lecture6 Signal and Systemsbabak danyal
 
Lecture5 Signal and Systems
Lecture5 Signal and SystemsLecture5 Signal and Systems
Lecture5 Signal and Systemsbabak danyal
 
Lecture4 Signal and Systems
Lecture4  Signal and SystemsLecture4  Signal and Systems
Lecture4 Signal and Systemsbabak danyal
 
Lecture3 Signal and Systems
Lecture3 Signal and SystemsLecture3 Signal and Systems
Lecture3 Signal and Systemsbabak danyal
 
Lecture2 Signal and Systems
Lecture2 Signal and SystemsLecture2 Signal and Systems
Lecture2 Signal and Systemsbabak danyal
 
Lecture1 Intro To Signa
Lecture1 Intro To SignaLecture1 Intro To Signa
Lecture1 Intro To Signababak danyal
 
Lecture9 Signal and Systems
Lecture9 Signal and SystemsLecture9 Signal and Systems
Lecture9 Signal and Systemsbabak danyal
 
Cns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption TechniquesCns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption Techniquesbabak danyal
 
Classical Encryption Techniques in Network Security
Classical Encryption Techniques in Network SecurityClassical Encryption Techniques in Network Security
Classical Encryption Techniques in Network Securitybabak danyal
 

More from babak danyal (20)

applist
applistapplist
applist
 
Easy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client SocketsEasy Steps to implement UDP Server and Client Sockets
Easy Steps to implement UDP Server and Client Sockets
 
Java IO Package and Streams
Java IO Package and StreamsJava IO Package and Streams
Java IO Package and Streams
 
Swing and Graphical User Interface in Java
Swing and Graphical User Interface in JavaSwing and Graphical User Interface in Java
Swing and Graphical User Interface in Java
 
Tcp sockets
Tcp socketsTcp sockets
Tcp sockets
 
block ciphers and the des
block ciphers and the desblock ciphers and the des
block ciphers and the des
 
key distribution in network security
key distribution in network securitykey distribution in network security
key distribution in network security
 
Lecture10 Signal and Systems
Lecture10 Signal and SystemsLecture10 Signal and Systems
Lecture10 Signal and Systems
 
Lecture8 Signal and Systems
Lecture8 Signal and SystemsLecture8 Signal and Systems
Lecture8 Signal and Systems
 
Lecture7 Signal and Systems
Lecture7 Signal and SystemsLecture7 Signal and Systems
Lecture7 Signal and Systems
 
Lecture6 Signal and Systems
Lecture6 Signal and SystemsLecture6 Signal and Systems
Lecture6 Signal and Systems
 
Lecture5 Signal and Systems
Lecture5 Signal and SystemsLecture5 Signal and Systems
Lecture5 Signal and Systems
 
Lecture4 Signal and Systems
Lecture4  Signal and SystemsLecture4  Signal and Systems
Lecture4 Signal and Systems
 
Lecture3 Signal and Systems
Lecture3 Signal and SystemsLecture3 Signal and Systems
Lecture3 Signal and Systems
 
Lecture2 Signal and Systems
Lecture2 Signal and SystemsLecture2 Signal and Systems
Lecture2 Signal and Systems
 
Lecture1 Intro To Signa
Lecture1 Intro To SignaLecture1 Intro To Signa
Lecture1 Intro To Signa
 
Lecture9 Signal and Systems
Lecture9 Signal and SystemsLecture9 Signal and Systems
Lecture9 Signal and Systems
 
Lecture9
Lecture9Lecture9
Lecture9
 
Cns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption TechniquesCns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption Techniques
 
Classical Encryption Techniques in Network Security
Classical Encryption Techniques in Network SecurityClassical Encryption Techniques in Network Security
Classical Encryption Techniques in Network Security
 

Recently uploaded

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 

Recently uploaded (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 

Final grasp ASE

  • 2. •Larman introduces a set of basic patterns that he calls GRASP: General Responsibility Assignment Software Pattern •Five GRASP Patterns: –Information Expert –Creator –High Cohesion –Low Coupling –Controller
  • 3. Problem:A system will have hundreds of classes. How do I begin to assign responsibilities to them? Solution:Assign responsibility to the Information Expert–the class that has the information necessary to fulfill the responsibility. Mechanics: Step 1: Clearly state the responsibility Step 2: Look for classes that have the information we need to fulfill the responsibility. Step 3:Domain Model or Design Model? Step 4:Sketch out some interaction diagrams. Step 5:Update the class diagram.
  • 4. :L ib r a r y b o r r o w R e s o u r c e (c a llN u m ) 1 : r := g e tR e s o u r c e (c a llN u m ): R e s o u r c e :C a ta lo g C a ta lo g is a n in fo r m a tio n e x p e r t o n fin d in g a n d r e tu r n in g a r e s o u r c e , b a s e d o n a c a ll n u m b e r . It lo g ic a lly c o n ta in s a ll o f th e m . b y E x p e r t W h a t c la s s s h o u ld b e r e s p o n s ib le fo r k n o w in g a r e s o u r c e , g iv e n a c a ll n u m b e r ?
  • 5. Problem: Who creates new instances of some class? Solution: Let class A create an instance of class B if…. •A aggregates(whole-part relationship) B objects •A contains B objects •A records instances of B objects •A closely uses B objects •A has initialization data that is needed when creating B objects. Mechanics: Step 1: Look at Domain / Design model and ask: “Who should be creating these classes”? Step 2:Look for classes that create, aggregate, etc. Step 3:Sketch or update interaction / class diagrams.
  • 6. :C a ta lo g m a k e B o o k (title ) 1 : c re a te (title ) :B o o k b y C r e a to r
  • 7. Problem: How do you support low dependency, low change impact, and increased reuse. Solution: Assign responsibility so responsibility remains low. Mechanics: Look for classes with many associations to other classes. Look for a methods that rely on a lot of other methods (or methods in other classes, I.e. dependencies. Rework your design as needed.
  • 8. Problem: How do you keep complexity manageable? Solution: Assign responsibility so that cohesion remains high. Mechanics: Look for classes with too-few or disconnected methods. Look for methods that do to much (hint: method name) Rework your design as needed.
  • 9. Problem: Who handles events from external actors, e.g. startup(), playSongs(), etc? Solution: Assign the responsibility to a controller class, such as: •A class that represents the overall system, device, or subsystem. Example: Jukebox. •A class that represents a use case. Example: makeSaleHandler. makeSaleCoordinator, etc. •These classes often don’t do the work, but delegate it to others.
  • 10. re c o rd B o rro w e r(lib ID ) :S y s te m b o rro w R e s o u rc e (c a llN u m ) p rin tB o rro w R e p o rt() L ib ra ria n ? p rin tB o rro w R e p o rt() . . . ? b o rro w R e s o u rc e (c a llN u m ) . . . ? re c o rd B o rro w e r(lib ID ) . . . C o n tra c t: re c o rd B o rro w e r ... P o s tc o n d itio n s : ... C o n tra c t: b o rro w R e s o u rc e ... P o s tc o n d itio n s : ... C o n tra c t: p rin tB o rro w R e p o rt ... P o s tc o n d itio n s : ... U s e C a s e : B o rro w R e s o u rc e s T h is u s e c a s e b e g in s ... ...