SlideShare a Scribd company logo
1 of 17
L04a Domain Modelling
Identifying Candidate Classes
TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT
Learning Objectives
• State why domain modelling is done
• List the steps in Noun Phrase Approach for finding
candidate classes
• Apply the technique to find candidate classes
OOAD 2
TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT
Domain Modelling
• What is a “domain”?
– Area of interest
– Area of the problem to be
solved
• Domain Modelling
– Modelling (to represent) the
business domain (problem
domain)
OOAD 3
TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT
Why Perform Domain Modelling?
• Define the key concepts for the problem
domain.
– Also called candidate classes
• Identify and relate the key abstractions (key
classes / ideas) that the system must handle:
these candidate classes will be used to later
analyse and design the use case.
OOAD 4
TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT
Conceptual/ Domain Modelling
• Two step process involving:
– Step 1: Find Candidate Classes
• Noun-Phrase Approach / Noun Analysis
– underline the noun(s) in the problem description and decide if they are
relevant and key to solving the problem)
– Step 2: Complete the domain model
• Add attributes
• Add relationships between classes
• Draw the classes, attributes and relationships on a class diagram.
• Domain Modelling captures:
• Candidate classes
• Attributes of candidate classes
• Relationships
OOAD 5
TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT
Noun Phrase Approach
OOAD 6
Finding candidate classes
(Noun phrase approach)
Complete the
domain model
We are here
Domain modelling
TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT
Noun Phrase Approach
• What are Nouns?
– A word that can be used to refer to a person, place,
thing, quality.
– Examples:
• Customer, Sale, ShoppingCart, Student, Movie, Teacher
– Noun with one or more other words.
– Example: "The black cat is happy."
• noun phrase: "the black cat"
– Noun/Class  Cat
– Attribute  Black
OOAD 7
TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT
OOAD 8
Exercise 1: Find the Nouns
• Given the following statement:
“All students in OOAD are fans of Mr. Bean and
watch his shows on their Laptops.”
• Find the nouns.
TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT
Noun Phrase Approach (Steps)
• Read the documents, look for noun phrases, and make a list of nouns
• Divide the list of nouns into these categories:
– Relevant (Candidate Class).
– Fuzzy (we are not sure).
– Irrelevant.
– Attributes.
• Write a statement of purpose for each noun.
– For what purpose do you want to “store” this data?
– For irrelevant nouns, there's no reason for having them.
• For those in the “Relevant” and “Fuzzy” categories, write possible attributes
relevant to the domain
– If no attributes, the class is irrelevant
OOAD 9
TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT
Guidelines for Class Identification
• Avoid computer implementation classes.
– Example: AccountDB_table
• too DB implementation specific
• If there are two classes with similar meaning, keep only one
(which is most meaningful).
– Subject & Course may have the same meaning
• If there is a class that is “relevant”, but does not map to a
concept in the system  re-write it as an attribute
– Name, age are not classes but attributes of another class
OOAD 10
TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT
OOAD 11
Exercise 2: Apply Noun Phrase Approach
• Given the following statement:
“School ABC wants to track the number of hours each
student spends in the lab. A student using the lab has
his/her matric number and date stored. Each lab has a
number and location.
A weekly report is generated showing the number of
hours spent by each student per lab.”
• Use the Noun Phrase Approach to identify the candidate
classes for the domain of this lab usage system. Use the
noun phase analysis template.
TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT
OOAD 12
Noun-Phrase Analysis Template
Noun/Noun
Phrase
Statement of
purpose
Possible Attributes Classification Accept
(Y/N)
Reason for
Rejection
Partial Noun phrase approach to identify
candidate classes: (one row per noun you find)
Write “Relevant”,
“Fuzzy”,
“Irrelevant”, or
“Attributes”
Write the
noun
Write the
possible
attributes
Y(es) – accept
As candidate
class
TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT
Food for Thought
• What are the steps in the noun phrase
approach?
• What are the categories in which we divide
our list of nouns?
OOAD 13
TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT
OOAD 14
Guidelines for Class Identification (1)
• Classes adorned with adjectives:
– Does the object represented by the noun behave
differently when the adjective is applied to it?
– If the use of the adjective signals that the behaviour of
the object is different, then make a new class.
– Example:
• If AdultMember and YouthMember behave differently or
contain several different properties, then they should be
classified as different classes.
TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT
OOAD 15
Guidelines for Class Identification(2)
• Irrelevant Classes:
– Each class must have a purpose and every class should be
clearly defined when necessary.
– If you cannot come up with a statement of purpose, simply
eliminate the candidate class.
– Example: If you are designing a computer system for the
school, and there is only 1 school, which is the Domain
environment for the system, we do not need to have School
class.
TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT
Naming Classes guidelines (3)
• Guidelines for Naming Classes
– The class should describe a single object, so it should be the singular form
of noun.
• Example: "Student" is correct; "Students" is wrong
– Use names that the users are comfortable with.
– The name of a class should reflect its intrinsic nature.
– Use readable names. By convention, the class name must begin with an
Upper-case letter.
– For compound words, capitalize the first letter of each word.
• Example: PartTimeStudent, FullTimeStudent.
OOAD 16
TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT
The fate of candidate classes
• As we move from Requirements (domain
modelling is considered a requirements
analysis technique) to Use Case Analysis and
Use Case Design, we may discover more
classes, and we may also refine attributes
and add operations to our existing candidate
classes.
OOAD 17

More Related Content

Similar to L04a - Identifying Candidate Classes - Part 1 (1).ppt

Week7 caseanalysis f2013
Week7 caseanalysis f2013Week7 caseanalysis f2013
Week7 caseanalysis f2013
educw200
 
Week7 caseanalysis f2013
Week7 caseanalysis f2013Week7 caseanalysis f2013
Week7 caseanalysis f2013
educw200
 
Week7 caseanalysis f2013
Week7 caseanalysis f2013Week7 caseanalysis f2013
Week7 caseanalysis f2013
educw200
 
Week 5 Part3 Lecture
Week 5 Part3 LectureWeek 5 Part3 Lecture
Week 5 Part3 Lecture
educw200
 
Tech integration plan
Tech integration planTech integration plan
Tech integration plan
emileelowell
 
Sp13 w200-w5-part3
Sp13 w200-w5-part3Sp13 w200-w5-part3
Sp13 w200-w5-part3
educw200
 
Workplace Simulated Courses - Course Technology Computing Conference
Workplace Simulated Courses - Course Technology Computing ConferenceWorkplace Simulated Courses - Course Technology Computing Conference
Workplace Simulated Courses - Course Technology Computing Conference
Cengage Learning
 

Similar to L04a - Identifying Candidate Classes - Part 1 (1).ppt (20)

Week7 caseanalysis f2013
Week7 caseanalysis f2013Week7 caseanalysis f2013
Week7 caseanalysis f2013
 
Week7 caseanalysis f2013
Week7 caseanalysis f2013Week7 caseanalysis f2013
Week7 caseanalysis f2013
 
Week7 caseanalysis f2013
Week7 caseanalysis f2013Week7 caseanalysis f2013
Week7 caseanalysis f2013
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
SBAC Performance Task Overview
SBAC Performance Task OverviewSBAC Performance Task Overview
SBAC Performance Task Overview
 
1st daypresem2018
1st daypresem20181st daypresem2018
1st daypresem2018
 
Laos Session 6: Developing Quality Assessment Items Extended Response Items
Laos Session 6: Developing Quality Assessment Items Extended Response ItemsLaos Session 6: Developing Quality Assessment Items Extended Response Items
Laos Session 6: Developing Quality Assessment Items Extended Response Items
 
Week 5 Part3 Lecture
Week 5 Part3 LectureWeek 5 Part3 Lecture
Week 5 Part3 Lecture
 
Tech integration plan
Tech integration planTech integration plan
Tech integration plan
 
Rica lk 11.2015
Rica lk 11.2015Rica lk 11.2015
Rica lk 11.2015
 
Teaching Object Oriented Programming Courses by Sandeep K Singh JIIT,Noida
Teaching Object Oriented Programming Courses by Sandeep K Singh JIIT,NoidaTeaching Object Oriented Programming Courses by Sandeep K Singh JIIT,Noida
Teaching Object Oriented Programming Courses by Sandeep K Singh JIIT,Noida
 
The why and what of testa
The why and what of testaThe why and what of testa
The why and what of testa
 
Sp13 w200-w5-part3
Sp13 w200-w5-part3Sp13 w200-w5-part3
Sp13 w200-w5-part3
 
Workplace Simulated Courses - Course Technology Computing Conference
Workplace Simulated Courses - Course Technology Computing ConferenceWorkplace Simulated Courses - Course Technology Computing Conference
Workplace Simulated Courses - Course Technology Computing Conference
 
Tesol 13 presentation
Tesol 13 presentationTesol 13 presentation
Tesol 13 presentation
 
What will they need? Pre-assessment techniques for instruction session.
What will they need?  Pre-assessment techniques for instruction session.What will they need?  Pre-assessment techniques for instruction session.
What will they need? Pre-assessment techniques for instruction session.
 
6_2019_10_31!10_52_47_PM.PPT
6_2019_10_31!10_52_47_PM.PPT6_2019_10_31!10_52_47_PM.PPT
6_2019_10_31!10_52_47_PM.PPT
 
Writing questions
Writing questionsWriting questions
Writing questions
 
AP SS Implementation
AP SS Implementation AP SS Implementation
AP SS Implementation
 
Week 5.3
Week 5.3Week 5.3
Week 5.3
 

Recently uploaded

MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MysoreMuleSoftMeetup
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 

Recently uploaded (20)

Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptxMichaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 
Ernest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell TollsErnest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell Tolls
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
Rich Dad Poor Dad ( PDFDrive.com )--.pdf
Rich Dad Poor Dad ( PDFDrive.com )--.pdfRich Dad Poor Dad ( PDFDrive.com )--.pdf
Rich Dad Poor Dad ( PDFDrive.com )--.pdf
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdfDiuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
 

L04a - Identifying Candidate Classes - Part 1 (1).ppt

  • 2. TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT Learning Objectives • State why domain modelling is done • List the steps in Noun Phrase Approach for finding candidate classes • Apply the technique to find candidate classes OOAD 2
  • 3. TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT Domain Modelling • What is a “domain”? – Area of interest – Area of the problem to be solved • Domain Modelling – Modelling (to represent) the business domain (problem domain) OOAD 3
  • 4. TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT Why Perform Domain Modelling? • Define the key concepts for the problem domain. – Also called candidate classes • Identify and relate the key abstractions (key classes / ideas) that the system must handle: these candidate classes will be used to later analyse and design the use case. OOAD 4
  • 5. TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT Conceptual/ Domain Modelling • Two step process involving: – Step 1: Find Candidate Classes • Noun-Phrase Approach / Noun Analysis – underline the noun(s) in the problem description and decide if they are relevant and key to solving the problem) – Step 2: Complete the domain model • Add attributes • Add relationships between classes • Draw the classes, attributes and relationships on a class diagram. • Domain Modelling captures: • Candidate classes • Attributes of candidate classes • Relationships OOAD 5
  • 6. TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT Noun Phrase Approach OOAD 6 Finding candidate classes (Noun phrase approach) Complete the domain model We are here Domain modelling
  • 7. TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT Noun Phrase Approach • What are Nouns? – A word that can be used to refer to a person, place, thing, quality. – Examples: • Customer, Sale, ShoppingCart, Student, Movie, Teacher – Noun with one or more other words. – Example: "The black cat is happy." • noun phrase: "the black cat" – Noun/Class  Cat – Attribute  Black OOAD 7
  • 8. TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT OOAD 8 Exercise 1: Find the Nouns • Given the following statement: “All students in OOAD are fans of Mr. Bean and watch his shows on their Laptops.” • Find the nouns.
  • 9. TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT Noun Phrase Approach (Steps) • Read the documents, look for noun phrases, and make a list of nouns • Divide the list of nouns into these categories: – Relevant (Candidate Class). – Fuzzy (we are not sure). – Irrelevant. – Attributes. • Write a statement of purpose for each noun. – For what purpose do you want to “store” this data? – For irrelevant nouns, there's no reason for having them. • For those in the “Relevant” and “Fuzzy” categories, write possible attributes relevant to the domain – If no attributes, the class is irrelevant OOAD 9
  • 10. TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT Guidelines for Class Identification • Avoid computer implementation classes. – Example: AccountDB_table • too DB implementation specific • If there are two classes with similar meaning, keep only one (which is most meaningful). – Subject & Course may have the same meaning • If there is a class that is “relevant”, but does not map to a concept in the system  re-write it as an attribute – Name, age are not classes but attributes of another class OOAD 10
  • 11. TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT OOAD 11 Exercise 2: Apply Noun Phrase Approach • Given the following statement: “School ABC wants to track the number of hours each student spends in the lab. A student using the lab has his/her matric number and date stored. Each lab has a number and location. A weekly report is generated showing the number of hours spent by each student per lab.” • Use the Noun Phrase Approach to identify the candidate classes for the domain of this lab usage system. Use the noun phase analysis template.
  • 12. TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT OOAD 12 Noun-Phrase Analysis Template Noun/Noun Phrase Statement of purpose Possible Attributes Classification Accept (Y/N) Reason for Rejection Partial Noun phrase approach to identify candidate classes: (one row per noun you find) Write “Relevant”, “Fuzzy”, “Irrelevant”, or “Attributes” Write the noun Write the possible attributes Y(es) – accept As candidate class
  • 13. TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT Food for Thought • What are the steps in the noun phrase approach? • What are the categories in which we divide our list of nouns? OOAD 13
  • 14. TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT OOAD 14 Guidelines for Class Identification (1) • Classes adorned with adjectives: – Does the object represented by the noun behave differently when the adjective is applied to it? – If the use of the adjective signals that the behaviour of the object is different, then make a new class. – Example: • If AdultMember and YouthMember behave differently or contain several different properties, then they should be classified as different classes.
  • 15. TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT OOAD 15 Guidelines for Class Identification(2) • Irrelevant Classes: – Each class must have a purpose and every class should be clearly defined when necessary. – If you cannot come up with a statement of purpose, simply eliminate the candidate class. – Example: If you are designing a computer system for the school, and there is only 1 school, which is the Domain environment for the system, we do not need to have School class.
  • 16. TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT Naming Classes guidelines (3) • Guidelines for Naming Classes – The class should describe a single object, so it should be the singular form of noun. • Example: "Student" is correct; "Students" is wrong – Use names that the users are comfortable with. – The name of a class should reflect its intrinsic nature. – Use readable names. By convention, the class name must begin with an Upper-case letter. – For compound words, capitalize the first letter of each word. • Example: PartTimeStudent, FullTimeStudent. OOAD 16
  • 17. TEMASEK POLYTECHNIC • SCHOOL OF INFORMATICS & IT The fate of candidate classes • As we move from Requirements (domain modelling is considered a requirements analysis technique) to Use Case Analysis and Use Case Design, we may discover more classes, and we may also refine attributes and add operations to our existing candidate classes. OOAD 17

Editor's Notes

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 7
  7. 8
  8. 9
  9. 10
  10. 11
  11. 12
  12. 13
  13. 14
  14. 15
  15. 16
  16. 17