OBJECT ORIENTED MODELING, CONCEPTS AND PRINCIPLES - PowerPoint PPT Presentation

1 / 42
About This Presentation
Title:

OBJECT ORIENTED MODELING, CONCEPTS AND PRINCIPLES

Description:

'New' way of thinking about problems using models ... Hypotenuse length. Border Color. Fill Color. Draw. Erase. Move. 21. 22. 23. Operations. Polymorphism ... – PowerPoint PPT presentation

Number of Views:76
Avg rating:3.0/5.0
Slides: 43
Provided by: applicatio5
Category:

less

Transcript and Presenter's Notes

Title: OBJECT ORIENTED MODELING, CONCEPTS AND PRINCIPLES


1
OBJECT ORIENTED MODELING, CONCEPTS AND PRINCIPLES
2
CONTENTS
  • What is object-oriented development ?
  • Object-oriented process model
  • Object-oriented concepts
  • Object modeling technique
  • Unified Modeling Language (UML)
  • Concepts and Principles of Object Modeling
  • Object-oriented vs functional approach

3
What is OO Development ?
  • New way of thinking about problems using models
    organized around real world concepts.
  • The fundamental construct is the object
  • Combines both data structure and operations in a
    single entity called an object.
  • Leads to reuse, faster software development and
    higher quality programs.
  • Easier to maintain
  • Structure inherently decoupled
  • Fewer side-effects

4
The OO process model
  • Moves through an evolutionary spiral
  • Emphasizes development of reuse capability

5
Object Oriented Concepts
  • Objects and Object Model
  • Object Data and operations relevant to some real
    world or significant program entity encapsulated
    into a monolithic unit accessible only through a
    well defined interface. For ex. File in the file
    system together with operations such as open,
    close, read, write,
  • Object Model Describes the structure of the
    objects in the system
  • their identity, relationships to other objects,
    attributes and operations.

6
Object Modeling
  • Classification Classes
  • A class describes a group of objects with similar
    properties (attributes), common behavior
    (operations), common relationships to other
    objects, and common semantics.

7
Object Classes
  • Thus, a class is an abstraction that describes
    relevant properties and hides the rest.
    Represented diagrammatically as below.

8
Object Modeling
9
Object Modeling
  • Attributes An attribute is a data value held by
    the objects in a class. Name, age, and weight are
    attributes of Person objects.

10
Object Modeling
  • Operations and Methods
  • Operations An operation is a function or
    transformation that may be applied to or by
    objects in a class. Each operation has a target
    object as an implicit argument. The behavior of
    the operation depends on the class of its target.
  • Methods A method is the implementation of an
    operation for a class.
  • Categories 1) manipulate data, 2) perform
    computation, and 3) monitor for occurrence of
    controlling event.

11
Object Modeling
  • An operation may have arguments in addition to
    its target object. Such arguments parameterize
    the operation but do not affect the choice of
    method.

12
(No Transcript)
13
Class and Instance
Polygon v(0,0),(0,1),(1,0) BC Red FC
Blue Draw Erase Move
14
Abstraction and Encapsulation
15
Abstraction and Encapsulation
  • Abstraction
  • Isolate those aspects that are important and
    suppress (or hide) those that are unimportant
    (e.g., representations).
  • Focus on what object is and does before deciding
    how it should be implemented.
  • Abstraction allows dealing only with application
    domain concepts, not making design and
    implementation decision before problem is
    understood.

16
Abstraction and Encapsulation
  • Encapsulation (Information Hiding)
  • Separates the external aspects of an object,
    which are accessible to other objects, from the
    internal implementation details of the object,
    which are hidden from other objects.
  • Combining Data and Operations
  • The OO approach combines the data structure and
    operations in a single entity.

17
Interfaces
  • Does not have an implementation of its own.
  • Other classes provide implementations of it.
  • Client classes are only interested in behavior.

18
Inheritance
  • Sharing of attributes and operations among
    classes based on hierarchical relationship.

19
(No Transcript)
20
Class and Subclass
21
(No Transcript)
22
(No Transcript)
23
Operations
  • Polymorphism
  • The same operation may behave differently on
    different classes. E.g., the move operation
    behaves differently on a Window and ChessPiece.
  • Operations may be overloaded when subclasses
    defined.
  • The compiler can distinguish based on the type of
    the operands in method invocations which
    operation is actually needed.

24
Polymorphism
25
Communication
  • Message destination, operation, params

26
What Does OO Mean?
  • Pressman (Coad Yourdon)
  • Objects (identity)
  • Classification
  • Inheritance
  • Communication
  • Rumbaugh
  • Objects (identity)
  • Classification
  • Inheritance
  • Polymorphism

27
Object Modeling Technique
  • Object modeling technique (OMT) extends from
    analysis thru design to implementation
  • Analysis model contains objects found in the
    application domain, including properties of
    object and their operations.
  • These application domain objects form a framework
    to the design model.

28
Object Modeling Technique
  • The same seamless notation is used from analysis
    to design to implementation.
  • The system is modeled using three related but
    different view points.
  • Object Model Represents the static, structural,
    data aspects of the system.
  • Dynamic Model Represents the temporal,
    behavioral, control aspects of the system.
  • Functional Model Represents transformational,
    functional aspects of the system.

29
Object Modeling
  • Links and Associations
  • Link A physical or conceptual connection between
    instances. E.g., Joe Smith Works-for Simplex
    company. Mathematically, a tuple, i.e., an
    ordered list of object instances. A link is an
    instance of an association.
  • Associations A group of links with common
    structure and semantics. E.g., a person Worksfor
    a company. All the links in an association
    connect objects from the same classes.

30
(No Transcript)
31
Object Modeling
  • Multiplicity
  • Specifies how many instances of one class may
    relate to a single instance of an associated
    class
  • Role Names
  • One end of an association. Binary association has
    two roles.
  • Link attributes
  • May be defined for associations, e.g., if the
    association is uses, the link attribute might
    be one of permission.

32
Binary Association Multiplicity
33
Ternary Association
34
Link Associations
35
Aggregation
  • A part-whole or a-part-of relationship

36
OO Software Process
  • Framework
  • Identify major classes and connections.
  • Do enough design to ensure they are implementable
  • Extract reusable components and build prototype.
  • Test to uncover errors and get customer feedback.
  • Iterate on design and refine it.
  • Engineer special objects (not in library).
  • Assemble a new prototype.
  • Test and obtain customer feedback.
  • Iterate until satisfactory product obtained.

37
OO Metrics
  • Because of reuse, LOC not so useful
  • of Scenario scripts, each a triplet of the form
  • initiator, action, participant, where
  • Initiator object initiating a request
  • action result of request (method invocation)
  • participant server object satisfying request
  • of key highly independent classes
  • of support classes (and ave. per key class)
  • of subsystems

38
Possible Estimating Approach
  • Develop scenario scripts and estimate count
  • Determine the number of key classes
  • Categorize key classes
  • Interface type Multiplier
  • No GUI 2.0
  • Text-based user int. 2.25
  • GUI 2.5
  • Complex GUI 3.0

39
Possible Estimating Approach
  • Estimate of support classes by multiplying
    key classes in each category by multiplier
  • Estimate of person-days per class, e.g., 15-20
  • Estimate the number of major iterations
  • There should be a contract deliverable for each
    major iteration

40
OO Progress Tracking
  • This needs to be done for each iteration (see
    text for list of specifics in each category)
  • OO analysis completed
  • OO design completed
  • OO programming completed
  • OO testing completed

41
Object-Oriented vs Structured Approach
  • Easier to maintain
  • Combines data structure and behavior in a single
    entity
  • Emphasizes object structure
  • Reuse more readily accomplished
  • Harder to maintain
  • May separate data and behavior
  • Emphasizes procedural structure
  • Reuse limited, hence possible delay in software
    construction

42
Object-Oriented vs Structured Approach
  • Strong cohesion and weak coupling
  • Encapsulation, Inheritance and Polymorphism are
    strong features of OO software development
  • Harder to achieve weak Coupling and strong
    cohesion
  • Some languages support encapsulation and
    polymorphism, but rarely inheritance

43
Identifying the Elements of an Object Model
  • Basic elements are Objects, attributes,
    operations and messages.
  • Objects Identification
  • External entities Any thing that produce or
    consume information.
  • A thing A report or a display.
  • An occurrence A telephone call.
  • An event An alarm.
  • A role Salesperson.
  • Organizational unit Account department.
  • A place Airport.
  • A structure A file or computer.

44
  • Potential Objects/Classes General Classification
  • homeowner role or external entity
  • sensor external entity
  • control panel external entity
  • installation occurrence
  • system (alias security system) thing
  • number / type not objects/attributes of sensor
  • master password thing
  • telephone number thing
  • sensor event occurrence
  • audible alarm external entity
  • monitoring service organizational unit
    or external entity.

45
Coad and Youdon suggestions(Peter Coad and
Edward Yourdon)
  • Retained information.
  • Needed services.
  • Multiple attributes.
  • Common attributes.
  • common operations.
  • Essential requirements.

46
  • Potential Objects/Classes General Classification
  • homeowner rejected 1,2 fails even though
    applies
  • sensor accepted all apply
  • control panel accepted all apply
  • installation rejected
  • system (alias security system) accepted all
    apply
  • number / type rejected 3 fails, attribute of
    sensor
  • master password rejected 3 fails
  • telephone number rejected 3 fails
  • sensor event accepted all apply
  • audible alarm accepted 2,3,4,5,6 apply
  • monitoring service rejected 1,2 fails even
    though applies

47
  • Attributes Identification
  • Name an instance of data object.
  • Describe the instance.
  • Make reference to another instance.
  • What data items fully define this object in the
    context of the problem in hand?
  • SafeHome Example
  • sensor information sensor type sensor number
    alarm threshold
  • alarm response information delay time
    telephone number alarm type
  • activation / deactivation information master
    password number of allowable tries temporary
    password.
  • identification information system ID
    verification phone number system status.

48
  • Operations Identification
  • that manipulate data in some way (adding,
    deleting).
  • that perform some computation.
  • operations that monitor an object for the
    occurrence of a controlling event.
  • SafeHome Example
  • sensor is assigned a number and type.
  • a master password is programmed for arming and
    disarming the system.

49
  • Management of Object-Oriented Software Project
  • Establishing a common process framework for a
    project
  • Using the framework and historical metrics to
    develop effort and time estimates.
  • Establish deliverables and milestones that will
    enable progress to be measured.
  • Defining check points for risk management.
  • Managing the changes that invariably occurs as
    the project progresses.
  • Tracking, monitoring and controlling progress.
Write a Comment
User Comments (0)
About PowerShow.com