ObjectOriented Software Engineering - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

ObjectOriented Software Engineering

Description:

define the classes (objects) that represent the problem to be solved. the manner in which the classes relate to and interact with one another ... – PowerPoint PPT presentation

Number of Views:53
Avg rating:3.0/5.0
Slides: 16
Provided by: desg
Category:

less

Transcript and Presenter's Notes

Title: ObjectOriented Software Engineering


1
Object-Oriented Software Engineering
  • Object-oriented Analysis
  • define the classes (objects) that represent the
    problem to be solved
  • the manner in which the classes relate to and
    interact with one another
  • the inner workings (attributes and operations) of
    objects
  • the communication mechanisms (messages) that
    allow them to work together
  • Object-oriented Design
  • the definition of a multi-layered software
    architecture
  • the specification of subsystems that perform
    required functions and provide infrastructure
    support
  • a description of objects (classes) that form the
    building blocks of the system
  • a description of the communication mechanisms
    that allow data to flow between layers,
    subsystems and objects
  • in summary system design, object design, human
    interface design, data management design and task
    management design

2
Object-Oriented Software Engineering
  • Steps in Object Oriented Design
  • 1. Identify objects
  • Consider main concepts and extract the objects
    concerned. Also, interviews, documentation etc
  • 2. Determine attributes
  • Consider the characteristics that distinguish an
    object (its state)
  • Need to prevent redundancies e.g. if we have the
    attribute, BooksOnLoan we do not need
    NumberOfBooksOnLoan as this can be calculated.
  • 3. Determine the services for the attributes
  • Typically, creation, updating, destruction are
    standard
  • Services that provide information on the state of
    an object. These may involve some processing e.g.
    a calculation. This is of course hidden to the
    object requesting the service. (It could be a
    table look up or a calculation for all it knows)

3
Object-Oriented Software Engineering
  • 4. Determine the object hierarchy
  • Search for relations between objects
  • what inherits from what depends on the usage.
    E.g. ReferenceBook and Journal may not be
    subtypes of non-fictional since they will not
    have the service Borrow
  • Advantages of the Object Oriented Approach
  • It is a natural way to look at things
  • Focuses on structuring the problem rather than a
    solution to it
  • There is a direct mapping from the requirements
    to design to implementation. The object hierarchy
    from requirements analysis is the basis for
    design and then implementation

4
Object-Oriented Software Engineering
  • Flexibility - Easy to add specialisations e.g. a
    class MusicBook, as it simply inherits
    attributes and services from, say,
    Non-Fictional. New attributes or services can
    be easily added.
  • Ease of Reuse.
  • Traditional techniques identify functions rather
    than objects. Functions change but objects tend
    to stay the same.
  • Inheritance allows new objects to be added as
    specialisations, so that class libraries can be
    created and easily added to
  • Encapsulation means information hiding,
    abstraction, high cohesion, low coupling and
    therefore easy maintenance

5
Object-Oriented Software Engineering
  • Object-oriented Testing
  • the nature of OO systems changes both testing
    strategy and testing tactics
  • Review OOA and OOD models for correctness
  • Review OOA and OOD models for consistency
  • Unit testing class testing
  • the smallest testable unit is the encapsulated
    class or object
  • testing of conventional software tends to focus
    on the algorithmic detail of a module and the
    data that flows across the module interface
  • class testing is driven by the operations
    encapsulated by the class and the state behaviour
    of the class

6
Object-Oriented Software Engineering
  • Object-oriented Testing
  • Integration testing
  • OO software does not have a hierarchical control
    structure, conventional top-down and bottom-up
    integration strategies have little meaning
  • integrating operations one at a time into a class
    is often impossible because of the direct and
    indirect interactions of the components that make
    up the class
  • the use of drivers and stubs as replacement
    operations is to be avoided when possible
  • Thread- based Testing integrates the set of
    classes required to respond to one input or event
    for the system. Each thread is integrated and
    tested individually.Regression testing is applied
    to ensure that no side effects occur

7
Object-Oriented Software Engineering
  • Use-based Testing begins the construction of the
    system by testing those classes (called
    independent classes) that use very few (if any)
    of server (other) classes. After the independent
    classes are tested, the next layer of classes,
    called dependent classes, that use the
    independent classes are tested. This sequence
    continues until the entire system is constructed
  • Validation Testing
  • focuses on user visible actions and user
    recognizable outputs from the system (like
    conventional validation)
  • the use-cases provide scenarios that have a high
    likelihood of uncovering errors in user
    interaction environments
  • test cases may be derived from the object
    behaviour model and from event flow diagram

8
Object-Oriented Modelling
  • Object Models
  • Object models describe the system in terms of
    object classes
  • An object class is an abstraction over a set of
    objects with common attributes and the services
    (operations) provided by each object
  • Various object models may be produced
  • Inheritance models
  • Aggregation models
  • Service models

9
Object-Oriented Modelling
  • Object Models
  • Natural ways of reflecting the real-world
    entities manipulated by the system
  • More abstract entities are more difficult to
    model using this approach
  • Object class identification is recognised as a
    difficult process requiring a deep understanding
    of the application domain
  • Object classes reflecting domain entities are
    reusable across systems
  • Object Class Notation

10
Object-Oriented Modelling
  • Inheritance Models
  • Organise the domain object classes into a
    hierarchy
  • Classes at the top of the hierarchy reflect the
    common features of all classes
  • Object classes inherit their attributes and
    services from one or more super-classes. these
    may then be specialised as necessary
  • Class hierarchy design is a difficult process if
    duplication in different branches is to be avoided

11
Object-Oriented Modelling
Library Class Hierarchy
12
Object-Oriented Modelling
User Class Hierarchy
13
Object-Oriented Modelling
  • Multiple Inheritance
  • Rather than inheriting the attributes and
    services from a single parent class, a system
    which supports multiple inheritance allows object
    classes to inherit from several super-classes
  • Can lead to semantic conflicts where
    attributes/services with the same name in
    different super-classes have different semantics
  • Makes class hierarchy reorganisation more complex

14
Object-Oriented Modelling
Multiple inheritance
15
Object-Oriented Modelling
  • Object Aggregation
  • Aggregation model shows how classes which are
    collections are composed of other classes
  • Similar to the part-of relationship in semantic
    data models
  • Object Assocition
  • shows how classes are interrealated, e.g.
    Lecturer teaches Module, 1M.
  • Class Diagram
  • shows inheritance, association, aggregation and
    multiplicity between classes

consists of
1..
Deck
Card
Write a Comment
User Comments (0)
About PowerShow.com