Practical ObjectOriented Development with UML and Java - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Practical ObjectOriented Development with UML and Java

Description:

Practical Object-Oriented Development with UML and Java. Chapter 4. Finding the Objects ... Object-Oriented Development with UML and Java. Categories Of Objects ... – PowerPoint PPT presentation

Number of Views:63
Avg rating:3.0/5.0
Slides: 23
Provided by: comp46
Category:

less

Transcript and Presenter's Notes

Title: Practical ObjectOriented Development with UML and Java


1
Practical Object-Oriented Development with UML
and Java
  • Chapter 4Finding the Objects

2
Building The OO Model
  • Historically two distinct activities are taking
    place simultaneously
  • problem analysis
  • product description
  • In actuality we are building a model of reality
    that captures both aspects

3
The Results
  • A Model that
  • Organizes the data into objects and classes, and
    gives the data a structure via relationships of
    inheritance, aggregation, and association
  • Organizes the services into classes or interfaces
    and gives them conceptual grouping via the
    generalization/specialization hierarchical
    structure
  • Defines the external interfaces (services
    prototypes) for all the class and interface
    services.
  • Specifies local functional behaviors and defines
    their external interfaces
  • Captures control or global behavior
  • Captures constraints (limits and rules)

4
Categories Of Objects (Coad and Yourdon)
  • Structure
  • Other systems
  • Devices
  • Events
  • Roles
  • Locations
  • Organizational units

5
Categories of objects (Shlaer and Mellor)
  • Tangibles
  • Roles
  • Incidents
  • Interactions
  • Specification

6
Object Categories (Ross)
  • People
  • Places
  • Things
  • Organizations
  • Concepts
  • Events

7
Identification Of Objects
  • Many methodologists have their own favorite
    approaches
  • All techniques have short comings
  • fail to identify all objects
  • identifies false objects
  • Current and traditional methods are covered here.

8
Using The Things To Be Modeled
  • Basic Steps Are
  • Identify individual or group things, such as
    persons, roles, organizations, logs, reports,
    forms, etc. in the application domain
  • Identify the corresponding objects and classes
  • Requires significant experience with OO to apply
    successfully

9
Using Definitions of Objects and Classes
  • This is a direct and effective approach in which
    the developer
  • uses object abstraction,
  • knowledge of the domain,
  • and the definition of class to intuitively
    identify them
  • Requires significant training, practice,
    intuition, and experience.

10
Using Object Decomposition
  • Assumes most object are composed of other objects
  • Basic approach is
  • Find the aggregate objects or class
  • Use object decomposition to identify their
    component objects or classes

11
Using Generalization
  • Assumes objects are identified prior to their
    classes, that every object is an instance of some
    class, and that commonalties among objects can be
    used to generalize classes.
  • Steps are
  • Identify all objects
  • Look for two or more objects that share the same
    attributes and services
  • Generalize the common aspects to form a class
  • To continue, use the method Using Subclasses

12
Using Subclasses
  • The steps are
  • Identify classes that share common resources
  • Factor out the common resources to form a super
    class, and then use inheritance for all classes
    that share these resources to form simpler
    subclasses

13
Using OO Domain Analysis
  • This technique assumes that an OO Domain Analysis
    has already been performed in the same problem
    domain.
  • The steps are
  • Analyze the results of the give OODA
  • Reuse objects or classes from the OODA

14
Reusing an Application Framework
  • This approach assumes that at least one OODA has
    been done to create an application framework of
    reusable classes
  • Steps are
  • Identify one ore more relevant application
    frameworks in the same application domain
  • Reuse both objects and classes from previously
    developed frameworks.

15
Reusing Class Hierarchies
  • This technique assumes that a reuse repository
    with relevant reusable class hierarchies has been
    developed
  • Steps are
  • Look for classes in the reuse repository that can
    be reused
  • After identifying the classes, attempt to reuse
    the associated class hierarchies
  • After modifying the classses, attempt to create
    new abstract classes by grouping common
    attributes and methods
  • If the classes are parameterized, supply the
    generic formal parameters

16
Reusing Individual Objects and Classes
  • If a reuse repository with relevant reusable
    objects and classes has been developed, we an
    reuse specific objects and classes.
  • Steps are
  • Look for relevant objects and classes in the
    reuse repository that can be applied to the
    application
  • If necessary, modify the objects and/or classes
  • Supply generic, formal parameters to
    parameterized classes as necessary.

17
Using Subassemblies
  • Assumes developers are incrementally developing
    subassemblies using a recursive development
    process
  • The steps are
  • Identify all of the objects (classes) at the
    current level that must remain temporarily
    complext because they depend on one or more as
    yet unidentified objects and classes
  • Develop a skeleton specification/design for the
    methods of the temporarily incomplete object.
  • Create the appropriate child subassemblies at the
    next lower level to handle the messages for the
    incomplete object at the higher level
  • Repeat all steps at the current level that has
    new subassemblies

18
Using Personal Experience
  • This assumes that the developer has already
    performed an analysis and can use that experience
    for this analysis
  • Steps are
  • Find the objects and classes that correspond to
    ones found in previous models that are in the
    same application domain.
  • Modify the classes as necessary to support the
    present project

19
Using Nouns
  • This assumes that written documents about the
    domain exist
  • Steps are
  • Obtain or author a narrative English text that
    represents an informal description of the problem
    to be solved.
  • Use the nouns, pronouns, and noun phrases to
    identify objects and classes
  • Verbs and predicate phrases are used to identify
    services

20
Using Traditional Data Flow Diagrams
  • This technique exploits existing DFD to identify
    objects and classes
  • Steps are
  • Map each terminator on the Context Diagram to an
    object to encapsulate the interface
  • Identify one class to encapsulate the interface
    of each set of similar or identical terminator
    objects
  • Map each data store on the DFD to an object
  • Map data stores that contain more than one data
    field to an aggregate object
  • Map all or part of the data transformation
    associated with the data store to a service of
    the object and thus of the class
  • Map complex data flows to an object
  • Identify subtransformations associated with the
    parts of the data flow and map these
    subtransformations to services of the object.

21
Using Class-Responsibility-Collaboration (CRC)
Cards
  • Based on the observations that identifying
    objects and classes is a human activity that can
    be stimulated by use of small pieces of paper to
    represent objects/classes.
  • Steps are
  • One a CRC card, document the name of the class
    and list both the responsibilities and
    collaborators.
  • Identify missing objects and/or classes that
    should be added to the existing set of CRC.

22
Recommendation
  • Most Novices Find That A Mixture Of Approaches
    Helps
  • Using Nouns To Identify Objects and Classes
  • Using CRC Cards To Promote Discussion
  • Using the Using Things To Be Modeled to Elicit
    More Potential Objects
Write a Comment
User Comments (0)
About PowerShow.com