Anda di halaman 1dari 21

OBJECT ORIENTED METHODOLOGIES

Object-Oriented Concepts
Prof. Talib Damij, Ph.D. Faculty of Economics University of Ljubljana

Object-Oriented Concepts
Object-oriented concepts

Information system
object-oriented concepts:

Objects Classes Attributes Associations Operations Inheritance


2

Prof. Talib Damij, Ph.D. Faculty of Economics, University of Ljubljana

Object-Oriented Concepts Object Oriented Methodologies

Objects
An object is any thing, real or abstract, about which we store data and those operations that manipulate the data (Martin, Odell 1992). An object is a tangible or intangible thing that can be classified and uniquely identified (Sanders, 1995). An object is simply something that makes sense in an application context (Rumbaugh et al., 1991).
Prof. Talib Damij, Ph.D. Faculty of Economics, University of Ljubljana
3

Object-Oriented Concepts Object Oriented Methodologies

Objects
An object is anything identified in the process of information system development and recognized by its properties (attributes) and behavior (operations).
Order, Shipment, organization. Invoice, Customer sales

Patient, Doctor, Disease, Medication - hospital.


Student, Professor, Course - school
Prof. Talib Damij, Ph.D. Faculty of Economics, University of Ljubljana
4

Object-Oriented Concepts Object Oriented Methodologies

Objects
Object identity

Identity (ID) is the property of an object which uniquely distinguishes it from other objects.
For example, invoice no. 1346, invoice no. 2612 and invoice no. 5270 - objects in the sales organization.

Prof. Talib Damij, Ph.D. Faculty of Economics, University of Ljubljana

Object-Oriented Concepts Object Oriented Methodologies

Classes
An object class describes a group of objects with similar properties (attributes), common behavior (operations), common relationships to other objects, and common semantics (Rumbaugh et al., 1991). Each group of objects - similar properties, behavior and relationships an abstraction called the object class.
Prof. Talib Damij, Ph.D. Faculty of Economics, University of Ljubljana
6

Object-Oriented Concepts Object Oriented Methodologies

Classes
For example, patients John Kim, Joe Brown, and Mary Hurt are objects with similar properties, behavior and relationships. Therefore, for this group of objects we created an object class called PATIENT which describes what is common to all these objects (patients).
Objects
John Kim John Brown Mary Hurt

Class of Patients

PATIENT
Prof. Talib Damij, Ph.D. Faculty of Economics, University of Ljubljana
7

Object-Oriented Concepts Object Oriented Methodologies

Attributes
An attribute is a data value held by the object in a class. An attribute is a property of objects in a class.
Patient-Id, Name, Address, Age, Weight, and Sex are attributes of class PATIENT. Customer-Id, Name, Address, and Phone, for example, are attributes of class CUSTOMER.

Prof. Talib Damij, Ph.D. Faculty of Economics, University of Ljubljana

Object-Oriented Concepts Object Oriented Methodologies

Attributes
A candidate key is a minimal set of attributes which uniquely identifies and represents an object.

Attribute Patient-Id - candidate key Patient-Id - minimal set of attributes identifies each object in class PATIENT.

PATIENT CLASS NAME Patient-ID Name Address Age Weight Sex

Prof. Talib Damij, Ph.D. Faculty of Economics, University of Ljubljana

Object-Oriented Concepts Object Oriented Methodologies

Associations
Associations are relationships between attributes and also between classes.

An association could be:


one-to-one, one-to-many and many-to-many.

Prof. Talib Damij, Ph.D. Faculty of Economics, University of Ljubljana

10

Object-Oriented Concepts Object Oriented Methodologies

Associations
One-to-one

One-to-one association

Prof. Talib Damij, Ph.D. Faculty of Economics, University of Ljubljana

11

Object-Oriented Concepts Object Oriented Methodologies

Associations
One-to-many

One-to-many association

Prof. Talib Damij, Ph.D. Faculty of Economics, University of Ljubljana

12

Object-Oriented Concepts Object Oriented Methodologies

Associations
Many-to-many

Many-to-many association Association class

Prof. Talib Damij, Ph.D. Faculty of Economics, University of Ljubljana

13

Object-Oriented Concepts Object Oriented Methodologies

Operations
An operation is a function or transformation that may be applied to or by objects in a class (Rumbaugh et al., 1991). Each class operations behavior of objects in this class.
ORDER CLASS NAME Order-ID Date Accept Cancel Modify

Prof. Talib Damij, Ph.D. Faculty of Economics, University of Ljubljana

14

Object-Oriented Concepts Object Oriented Methodologies

Operations
Methods specify the way in which operations are encoded in software (Martin, 1993).

A method then is the implementation of a determined operation.

Prof. Talib Damij, Ph.D. Faculty of Economics, University of Ljubljana

15

Object-Oriented Concepts Object Oriented Methodologies

Operations
The operations of any class can access only the data structures of this class.
For example, if object A needs to use or manipulate data structures of object B, then object A has to call a certain operation of object B.

This is a very important feature of objectoriented modeling called encapsulation.

Prof. Talib Damij, Ph.D. Faculty of Economics, University of Ljubljana

16

Object-Oriented Concepts Object Oriented Methodologies

Inheritance
Inheritance: identifying and defining a system of hierarchies between classes, where a subclass can inherit attributes and operations from a higher superclass.
Inheritance can be added in two directions:

Generalization (Bottom-Up analysis) Specialization (Top-Down analysis)

Prof. Talib Damij, Ph.D. Faculty of Economics, University of Ljubljana Object-Oriented Concepts Object Oriented Methodologies

17

Inheritance
Generalization

Generalization: creating a higher superclass for similar characteristics (common attributes and operations) of a determined group of existing classes.
ORDER

GENERALIZATION
Is-a
CUST-ORDER

Is-a
ORG-ORDER

Prof. Talib Damij, Ph.D. Faculty of Economics, University of Ljubljana

18

Object-Oriented Concepts Object Oriented Methodologies

Inheritance
Specialization

Specialization is refining existing classes into specialized subclasses. The created subclasses inherit the characteristics of the classes to which they are related. In addition, they can have their own unique characteristics.
STUDENT

SPECIALIZATION
Is-a
GRADUATE

Is-a
UNDERGRADUATE

Prof. Talib Damij, Ph.D. Faculty of Economics, University of Ljubljana

19

Object-Oriented Concepts Object Oriented Methodologies

Inheritance
Generalization and specialization are two different analyses of the same relationship.

Generalization is bottom-up analysis of classes, whilst specialization is topdown analysis of classes.

Prof. Talib Damij, Ph.D. Faculty of Economics, University of Ljubljana

20

Object-Oriented Concepts Object Oriented Methodologies

OBJECT ORIENTED METHODOLOGIES


Object-Oriented Concepts
Prof. Talib Damij, Ph.D. Faculty of Economics University of Ljubljana

Anda mungkin juga menyukai