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 f2013educw200
 
Week7 caseanalysis f2013
Week7 caseanalysis f2013Week7 caseanalysis f2013
Week7 caseanalysis f2013educw200
 
Week7 caseanalysis f2013
Week7 caseanalysis f2013Week7 caseanalysis f2013
Week7 caseanalysis f2013educw200
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingMoutaz Haddara
 
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 ItemsNEQMAP
 
Week 5 Part3 Lecture
Week 5 Part3 LectureWeek 5 Part3 Lecture
Week 5 Part3 Lectureeducw200
 
Tech integration plan
Tech integration planTech integration plan
Tech integration planemileelowell
 
Rica lk 11.2015
Rica lk 11.2015Rica lk 11.2015
Rica lk 11.2015lkeisler
 
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,NoidaDr. Sandeep Kumar Singh
 
The why and what of testa
The why and what of testaThe why and what of testa
The why and what of testaTansy Jessop
 
Sp13 w200-w5-part3
Sp13 w200-w5-part3Sp13 w200-w5-part3
Sp13 w200-w5-part3educw200
 
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 ConferenceCengage Learning
 
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.gwenexner
 
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.PPTharvinderjabbal
 
AP SS Implementation
AP SS Implementation AP SS Implementation
AP SS Implementation Kim Moore
 

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

The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
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
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
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
 
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
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 

Recently uploaded (20)

The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.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
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
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
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
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
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 

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