Professional Documents
Culture Documents
OOSE by Prof Buddhadev
OOSE by Prof Buddhadev
• Class hierarchy
– attributes and methods of a superclass are inherited by its
subclasses
• Messages
– the means by which objects exchange information with one
another
• Inheritance
– provides a means for allowing subclasses to reuse existing
superclass data and procedures
– provides mechanism for propagating changes
• Polymorphism
– mechanism that allows several objects in an class
hierarchy to have different methods with the same
name
– instances of each subclass will be free to respond to
messages by calling their own version of the method
• External Entities
– devices or people
• Things in Problem Domain
– Reports, displays, signals
• Events
– completion of some task
• Roles
– manager, engineer, salesperson
• Organizational Units
– divisions, groups, teams
• Structures
– sensors, vehicles, computers
Software Engineering Concepts Slide 24
Criteria for Including Objects
• Contracts completed.
• OO Analysis completed.
• OO Design completed.
• OO Programming completed.
• OO Testing completed.
– Context:
• Often in a domain model you find a set of related objects
(occurrences).
• The members of such a set share common information
– but also differ from each other in important ways.
– Problem:
• What is the best way to represent such sets of occurrences in a class
diagram?
– Forces:
• You want to represent the members of each set of occurrences
without duplicating the common information
• Antipatterns:
– Solution:
– Solution:
• Antipattern:
– Context:
• A role is a particular set of properties associated with an
object in a particular context.
• An object may play different roles in different contexts.
– Problem:
• How do you best model players and roles so that a player
can change roles or possess multiple roles?
• Example 1:
• Example 2:
• Antipatterns:
– Solution:
• Antipatterns:
– Connect an observer directly to an observable so
that they both have references to each other.
– Make the observers subclasses of the observable.