Professional Documents
Culture Documents
Classification
Employer Employee
• Adjectives classes:
- Be wary of the use of adjectives.
• Adjectives can be used in many ways
• An adjective can suggest a different kind of
object, different use of the same object, or it
could be utterly irrelevant.
• Ex: adult members behave different from
young members so the two should be
classified a different classes
Guidelines (to select classes from problem domain)…
• Irrelevant classes:-
• Each class must have a purpose and every
class should be clearly defined and necessary.
• You must formulate a statement of purpose for
each candidate classes.
• If you cannot come up with a statement of
purpose, simply eliminate the candidate class
Review redundant classes
Review adjectives
Review irrelevant classes
Review attributes
• Case study : The vianet bank system -identifying
classes by using noun phrase approach
Initial list of noun phrases: candidate classes:
– Account
– Account Balance
– Amount
Four digit
– ATM card
Review PIN code/no
– PIN
=====> Checking
– Four digit Client’s Account
classes
– PIN code/no Client’s Balance
– Checking
– Client
– Client’s Account
– Client’s Balance
Guidelines for identifying
super-sub class relationship
Top-down
Bottom-up
Reusability
Multiple inheritance
Defining super-sub relationship
• Top-down : Look for noun phrases composed of
various adjectives in the class name
carburetor
• Does the part class belong to a problem domain?
• Is the part class within the system’s
responsibilities?
• Does the part class capture more than a single
value?
• Does it provides a useful abstraction in dealing
problem domain?
• Hallow diamond represents Aggregation?
A-part-of-relationship patterns
• Assembly: an assembly is constructed from its
parts and an assembly-part situation physically
exists
House
• For example
a house can be considered
as a container for furniture
and appliances
Furniture Appliances
• Collection–member:- a conceptual whole
encompasses parts that may be physical or
conceptual
Football Team
• For example
a football teams is
a collection of players.
Player
Case study Relationship analysis for
vianet bank ATM system
• Identifying classes relationships
• One of the strengths of object-oriented analysis
is the ability to model objects as they exist in
the real world.
• Several different relationships exist in the
vianet bank ATM system
• Developing a UML class diagram based on the use-
case analysis
BANK Account
– Bank client
– ATM machine
– Transaction
– Savings Account
– Checking Account
Defining associations
• Part-of ,next-to, works-for
• Location association:
– next to, part of, contained in
• Communication association
– talk to, order to
BANK
Account
Has
1,2