Presentation is loading. Please wait.

Presentation is loading. Please wait.

2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,

Similar presentations


Presentation on theme: "2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,"— Presentation transcript:

1 2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A. Hoffer

2 Chapter 2 2-2 © Prentice Hall, 2004 Outline OO Terminology: -- Object, Encapsulation. – Class, Attribute, and Methods (processes, operations). – Generalization, Inheritance, Polymorphism. – Association. – Modeling and the Unified Modeling Language (UML).

3 Chapter 2 2-3 © Prentice Hall, 2004 Object A business entity (person, agency in environment, thing, concept) important for business). An entity that encapsulates data and behavior - Objects are categorized into classes - Each individual object is an instance of a class

4 Chapter 2 2-4 © Prentice Hall, 2004 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 object’s interface

5 Chapter 2 2-5 © Prentice Hall, 2004 Objects & Classes Class: A category of objects that share attributes, operations, relationships, and semantics Object: An instance of a class Name Attributes Operations Object – An instance of class with specified Values of Attributes (specific data) 12005 09/10/2003 16/10/2003 Class

6 Chapter 2 2-6 © Prentice Hall, 2004 Attributes 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

7 Chapter 2 2-7 © Prentice Hall, 2004 Operation/Method A behavior of an object; what it can do We use operation and method interchangeably Methods are identified and invoked by their signatures, including name, parameters, and return type

8 Chapter 2 2-8 © Prentice Hall, 2004 Signature identifies and invokes the behavior Method implements the behavior

9 Chapter 2 2-9 © Prentice Hall, 2004 Minus sign indicates private domain. Plus sign indicates public domain (accessible). Inaccessible to other objects Only object’s methods can access that object’s data

10 Chapter 2 2-10 © Prentice Hall, 2004 Inheritance: The technique by which the more specific class in a generalization relationship includes the attributes and methods of the more general class Generalization: The relationship between a more general (or parent) class and a more specific (or child) class The more specific class can have additional attributes and operations (methods) Inheritance & Generalization

11 Chapter 2 2-11 © Prentice Hall, 2004 Subclasses inherit attributes & operations of the superclass, plus have some of their own. Generalization represented by arrows from subclasses to superclass. Class “generalizes” attributes & methods of subclasses.

12 Chapter 2 2-12 © Prentice Hall, 2004 Association A relationship between objects or between classes (special associations). Types: (1) Special associations between classes: – Generalization (previous slide) – Part-Whole associations: Aggregation: part-whole relationships where the part can exist independently of the whole (e.g., Bill—Item) Composition: part-whole relationships where the part and the whole are fully dependent on each other (e.g., Building—Room)

13 Chapter 2 2-13 © Prentice Hall, 2004 This is a binary association, showing roles (“places”) and multiplicities (one-to-many objects participating in association) Types of Associations: (2) Between objects places >

14 Chapter 2 2-14 © Prentice Hall, 2004 Each type of vehicle has its own version of calcPrice() Message: Calculate pricePolymorphism The ability of different classes to respond to same messages in different ways. (Polymorphism = “many forms”.)

15 Chapter 2 2-15 © Prentice Hall, 2004 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

16 Chapter 2 2-16 © Prentice Hall, 2004 Interface The point of connection between different system parts (e.g., components). Technique by which users of a component invoke its behaviors and manipulate its properties The interface is implemented by method signatures

17 Chapter 2 2-17 © Prentice Hall, 2004 Interfaces are represented as small rectangles

18 Chapter 2 2-18 © Prentice Hall, 2004 Package Group of classes sharing similar characteristics or purposes (e.g., Sales package, Accounting package)

19 Chapter 2 2-19 © Prentice Hall, 2004 Unified Modeling Language™ (UML) UML is a standard notation for representing object-oriented systems. Used with Rational Unified Process ™ various symbol used in various diagrams representing classes, objects, system behavior See pervious slides – all are in UML


Download ppt "2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,"

Similar presentations


Ads by Google