Introduction to Object Orientation - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

Introduction to Object Orientation

Description:

A category of objects that share the same attributes, operations, relationships, semantics ... Attributes. Operations. 7. What Is an Attribute? ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 26
Provided by: mikem200
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Object Orientation


1
Team-Based DevelopmentISYS321
  • Introduction to Object Orientation

2
Unified Modeling Language (UML)
  • A standard notation for representing
    object-oriented systems
  • Boxes represent classes, components, packages,
    objects
  • Containing attributes and operations
  • Provide interfaces to external entities
  • Lines represent generalization and other
    relationships

3
Sample UML Diagram
4
What Is an Object?
  • An entity that encapsulates data and behavior
  • Objects are categorized into classes
  • Each individual object is an instance of a class

5
What Is a Class?
  • A category of objects that share the same
    attributes, operations, relationships, semantics
  • All objects are instances of classes
  • Consider a business object such as SalesOrder -
    Attributes could include order date while-
    Operations could include calculate order
    total- These objects would be in the SalesOrder
    class

6
Name
Attributes
Operations
7
What Is an Attribute?
  • Attribute- a named property of a class that
    describes a range of values that instances of the
    attribute might hold
  • Attributes are the way classes encapsulate data

8
Attributes are properties containing values
9
What Is an Operation?
  • A behavior of an object
  • Classes contain methodssignature
  • Methods are identified and invoked by their
    signatures (including name, parameters, and
    return type)

10
Signature identifies and invokes the behavior
Method implements the behavior
11
What Is Encapsulation?
  • The characteristic of object-orientation in which
    data and behavior are bundled into a class and
    hidden from the outside world
  • Access to the data and behavior is provided and
    controlled through an objects interface

12
Method signatures
13
What Is Generalization?
  • A relationship between a more general (or parent)
    class and a more specific (or child) class
  • The more specific class has additional attributes
    and operations

14
What Is Inheritance?
  • The mechanism by which the more specific class in
    a generalization relationship includes the
    attributes and operations of the more general
    class
  • The child inherits attributes and operations from
    parent

15
Generalization represented by arrows from
subclass to superclass
Subclasses inherit all attributes and operations
of superclasses
16
What Is Polymorphism?
  • The ability for different classes of objects to
    respond to identical messages in different ways
  • Polymorphism having many forms
  • Different behaviors for the same message
  • This is a very important requirement for
    component-based development

17
Here, each type of vehicle has its own version of
calcPrice()
18
What Is an Interface?
  • The mechanism by which users of a component
    invoke its behaviors and manipulate its
    properties
  • The interface is implemented by method signatures

19
What Is a Component?
  • A replaceable part of a system providing a
    clearly defined function through a set of
    interfaces
  • Group of classes working together toward a common
    end a subsystem
  • Fosters reusability

20
Interfaces are represented as small rectangles
21
What Is a Package?
  • A general-purpose mechanism for organizing
    elements into groups
  • Group of classes sharing similar characteristics
    or purposes

22
(No Transcript)
23
What Is an Association?
  • A relationship or link between instances of one,
    two, or more classes
  • Three types
  • Simple associations no ownership
  • Aggregations part-whole relationships where the
    part can exist independently of the whole but the
    whole has no meaning without the parts (ie. Team
    has members)
  • Compositions part-whole relationships where the
    part and the whole are fully dependent on each
    other(i.e. sales order and its line items)

24
This is a binary association, showing roles and
multiplicities
25
  • Any Questions?
Write a Comment
User Comments (0)
About PowerShow.com