Pertemuan 4 Object Oriented Concept Matakuliah : M0174/OBJECT ORIENTED DATABASE

advertisement

Matakuliah

Tahun

Versi

: M0174/OBJECT ORIENTED DATABASE

: 2005

: 1/0

Pertemuan 4

Object Oriented Concept

1

Learning Outcomes

Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu :

• Mahasiswa dapat Menjelaskan konsep berorientasi objek (C2)

2

Outline Materi

• Abstraction

• Encapsulation

• Information hiding

• Methods

• Message

• Inheritance

• Polymorphism

• Dynamic binding

3

Abstraction

• Abstraction is a process of identifying the essential aspects of an entity and ignoring the unimportant properties.

• There are two fundamental aspect of abstraction:

– Encapsulation

– Information Hiding

4

Encapsulation

• The concept of encapsulation means that an object contain both the data structure and the set of operation that can be used to manipulate it.

• The concept of information hiding means that we separate the external aspect of an object from its internal details, which are hidden from the outside world. In this way the internal details of an object can be changed without effecting the application that use it.

5

Information hiding

• There are two views of encapsulation:

– Object Oriented Programming Language view.

– Database adaptation view.

• In OPPL encapsulation is achieved through

Abstract Data Type (ADT). In this view an object has an interface part and an implementation part.

• The interface provide specification of the operations that can be performed on the object.

The implementation part consist of the data structure for ADT and the functions that realize the interface. Only interface part is visible to other object or user

6

• In the database view, proper encapsulation is achieved by ensuring that programmers have access only to the interface part. In this way encapsulation provides a form logical data independence: we can chance the internal implementation of an ADT without changing any of the application using that

ADT

7

Methods

• In object technology, function are usually called methods.

• Methods define the behavior of the object.

They can used to change the object state by modifying its attribute values, or to query the values selected attributes

8

Message

• Message are the means by which objects communicate.

• A message is simply a request from one object to another object asking the second object to execute one of its methods.

9

Inheritance

• Inheritance allows one class to be define a special case of a more general class.

• This special case are known as subclass and more general class are known as superclass.

• The process of forming a superclass is referred to as generalization and process of forming a subclass is specialization

10

Polymorphism

• The word of Polymorphism come from

Greek meaning ' having many forms ‘.

• Conducive Polymorphism a method which have been defined at superclass earn redefinition at subclass according to what becoming requirement of subclass.

11

Dynamic binding

• Therefore in technology object-oriented needed a mechanism arranging how a method executed.

• This mechanism is referred as binding.

• Dynamic Binding is a mechanism election of correct method to be executed at the time of runtime.

12

SUMMARY

• Object Oriented Concepts include :

– Abstraction

– Encapsulation

– Information hiding

– Methods

– Message

– Inheritance

– Polymorphism

– Dynamic binding

13

Download