DOMAIN CLASS MODEL
 First step to in analyzing the requirements.
 Shows the static structure of real world system.
 Organizes them into workable pieces.
 Describes real world classes and relationship to each
other.
2/24/2016 1
Steps to construct a domain model:
1. Find classes.
2. Prepare a data dictionary.
3. Find associations.
4. Find attributes of objects and links.
5. Organize and simplify classes using inheritance.
6. Verify that access path exists for likely queries.
7. Iterate and refine the model.
8. Reconsider the level of abstraction.
9. Group classes into packages.
2/24/2016 2
1)Finding classes:-
• The first step in constructing a class model is to find relevant
classes for object from the application domain.
• Classes must make sense in the application domain that are
explicit or implicit in application domain, or can be based on
general knowledge.
• Classes often corresponds to nouns.
• Ex: a reservation system to sell tickets to performances at
theaters.
2/24/2016 3
Requirement Tentative Classes
sources classes
fig: finding classes by considering nouns
Example of ATM classes
Fig: ATM classes extracted from problem statement nouns
2/24/2016 4
Extract
nouns
Eliminate
spurious
classes
Bank
Computer
Cashier ATM Bank Banking
Network
Account Transaction Cashier
Station
Account
Data
Central
Computer
Cash card User Cash System
Record
keeping
Provision
Security
Provision
Cost Customer Receipt
Software
access
Keeping the RIGHT Classes:-
• Bad classes:
attributes
redundant
irrelevant
vague implementation
2/24/2016 5
System
Security
Provision
Record
keeping
Provision
Banking
network
Account
Data Receipt
Cash
Software
access
Transaction log
Communication
line
User
Cost
• Good classes:
Classes can be created on the basis of:
• Redundant classes: if classes express same concepts,keep the
most descriptive name.
• Irrelevant classes: classes which have little or nothing to do with
the problem, eliminate them.
• Vague classes: a class should be specific. Some may have ill-
boundaries or too broad in scope.
2/24/2016 6
ATMAccount Bank Bank
Computer
Central
Computer
Customer Transaction
Cashier
Cash card
Cashier
Station
• Attributes: Names that describes some properties
should not be classes, until and unless they shows
independent existence.
• Operations: If a name describes an operation and not
manipulated in its own right, then it is not a class.
• Roles: classes should show the intrinsic nature and
not the roles that it plays on an association.
• Implementation constructs: words or names which
shows a process which is applied during
implementation should not be considered as class.
• Derived classes: classes which can be derived from
other classes which already been mentioned should be
omited.
2/24/2016 7
2)Preparing a data dictionary:
• Write a paragraph precisely describing each class.
• Describe the scope of the class regarding the problem
statement, including restriction and assumption on its
use.
• For ex:
Account-A single account at a bank against which a transaction
can be applied. Accounts can be of various types such as current
or savings.one customer can holds many accounts
ATM: A station that allows customers to enter their owm
transactions using cash cards as identification.
2/24/2016 8
3) Finding Associations:
2/24/2016
• A structural relationship between classes is called as an
association.
• Associations often correspond to stative verbs or verb phrases.
• These can be used to describe the attributes of class.
Keeping the right associations:
Associations which are incorrect and unnecessary should be
discarded using the criterias:
 Associations between eliminated classes.
 Irrelevant or implementation associations
 Actions
 Ternary associations
9
 Derived associations
 Misnamed associations
 Associations end names
 Qualified associations
 Multiplicity
 Missing associations
 Aggregation
2/24/2016 10
2/24/2016 11
2/24/2016 12

Domain class model

  • 1.
    DOMAIN CLASS MODEL First step to in analyzing the requirements.  Shows the static structure of real world system.  Organizes them into workable pieces.  Describes real world classes and relationship to each other. 2/24/2016 1
  • 2.
    Steps to constructa domain model: 1. Find classes. 2. Prepare a data dictionary. 3. Find associations. 4. Find attributes of objects and links. 5. Organize and simplify classes using inheritance. 6. Verify that access path exists for likely queries. 7. Iterate and refine the model. 8. Reconsider the level of abstraction. 9. Group classes into packages. 2/24/2016 2
  • 3.
    1)Finding classes:- • Thefirst step in constructing a class model is to find relevant classes for object from the application domain. • Classes must make sense in the application domain that are explicit or implicit in application domain, or can be based on general knowledge. • Classes often corresponds to nouns. • Ex: a reservation system to sell tickets to performances at theaters. 2/24/2016 3
  • 4.
    Requirement Tentative Classes sourcesclasses fig: finding classes by considering nouns Example of ATM classes Fig: ATM classes extracted from problem statement nouns 2/24/2016 4 Extract nouns Eliminate spurious classes Bank Computer Cashier ATM Bank Banking Network Account Transaction Cashier Station Account Data Central Computer Cash card User Cash System Record keeping Provision Security Provision Cost Customer Receipt Software access
  • 5.
    Keeping the RIGHTClasses:- • Bad classes: attributes redundant irrelevant vague implementation 2/24/2016 5 System Security Provision Record keeping Provision Banking network Account Data Receipt Cash Software access Transaction log Communication line User Cost
  • 6.
    • Good classes: Classescan be created on the basis of: • Redundant classes: if classes express same concepts,keep the most descriptive name. • Irrelevant classes: classes which have little or nothing to do with the problem, eliminate them. • Vague classes: a class should be specific. Some may have ill- boundaries or too broad in scope. 2/24/2016 6 ATMAccount Bank Bank Computer Central Computer Customer Transaction Cashier Cash card Cashier Station
  • 7.
    • Attributes: Namesthat describes some properties should not be classes, until and unless they shows independent existence. • Operations: If a name describes an operation and not manipulated in its own right, then it is not a class. • Roles: classes should show the intrinsic nature and not the roles that it plays on an association. • Implementation constructs: words or names which shows a process which is applied during implementation should not be considered as class. • Derived classes: classes which can be derived from other classes which already been mentioned should be omited. 2/24/2016 7
  • 8.
    2)Preparing a datadictionary: • Write a paragraph precisely describing each class. • Describe the scope of the class regarding the problem statement, including restriction and assumption on its use. • For ex: Account-A single account at a bank against which a transaction can be applied. Accounts can be of various types such as current or savings.one customer can holds many accounts ATM: A station that allows customers to enter their owm transactions using cash cards as identification. 2/24/2016 8
  • 9.
    3) Finding Associations: 2/24/2016 •A structural relationship between classes is called as an association. • Associations often correspond to stative verbs or verb phrases. • These can be used to describe the attributes of class. Keeping the right associations: Associations which are incorrect and unnecessary should be discarded using the criterias:  Associations between eliminated classes.  Irrelevant or implementation associations  Actions  Ternary associations 9
  • 10.
     Derived associations Misnamed associations  Associations end names  Qualified associations  Multiplicity  Missing associations  Aggregation 2/24/2016 10
  • 11.
  • 12.