Presentation is loading. Please wait.

Presentation is loading. Please wait.

OBJECT ORIENTED PROGRAMMING Using C++

Similar presentations


Presentation on theme: "OBJECT ORIENTED PROGRAMMING Using C++"— Presentation transcript:

1 OBJECT ORIENTED PROGRAMMING Using C++
BAHASA PEMROGRAMAN 2 OBJECT ORIENTED PROGRAMMING Using C++

2 Tentang saya Wahyu S. J. Saputra, S.Kom
S1 Teknik Informatika UPN “Veteran” Jatim Tugas:

3 Tujuan Umum Mahasiswa memahami paradigma pemrograman berorientasi objek dalam lingkungan bahasa C++. Khusus Mahasiswa memahami konsep class dan object. Mahasiswa memahami konsep constructor dan destructor. Mahasiswa memahami konsep polymorphism. Mahasiswa memahami konsep inheritance.

4 Buku Referensi Object Oriented Programming with C++, E. Balagurusamy, Tata McGraw-Hill, 1995. Internet. Bahan Kuliah : map ke server LAN \\ \kuliah

5 Penilaian UTS UAS Tugas & Quiz Kehadiran

6 Satuan Acara Perkuliahan
Kontrak Kuliah + Pengenalan Dasar OOP Class dan Object 1 Class dan Object 2 Class dan Object 3 Constructors dan Destructors 1 Constructors dan Destructors 2 Demo Program/ Quiz UTS Polymorphism/ Overloading Inheritance 1 Inheritance 2 Pointer dan Virtual Function OO Development + Quiz Demo Program 1 Kelompok 1 – 5. Demo Program 2 Kelompok 6 – 10. UAS

7 CATATAN Toleransi keterlambatan hadir adalah 30 menit.
Mahasiswa harus berpakaian rapi dengan baju berkerah dan bersepatu. Tidak ada toleransi untuk kecurangan selama ujian tulis. Ujian/ tugas susulan akan diberikan dengan menunjukkan surat keterangan yang jelas.

8 Case Studies FRS Online SIM Nilai Praktikum Penjualan Voucher HP
Tarif Jasa Parkir SIM Gaji Pegawai Billing Warnet Pendaftaran Mahasiswa Baru SIM Hewan di Kebun Binatang Penjualan Sepeda Motor Rental VCD

9 Object Oriented Programming
Introduction to Object Oriented Programming Concepts

10 Edsger Dijkstra The machines have become several orders of magnitude more powerful! As long as there were no machines, programming was no problem at all; When we had a few weak computers, programming became a mild problem, and Now we have gigantic computers, programming has become an equally gigantic problem.

11 SOFTWARE CRISIS 60% projects had schedule overruns,
50% projects had cost overruns, 45% projects could not be used, 29% projects was never delivered, and 19% projects had to be reworked to be used. *USA contractors surveyed

12 Object-oriented programming addresses those problem by strongly emphasizing modularity in software.
Modul is a component of a larger system, and operate within that system independently from the operations of the other components.

13 Object Oriented Programming Procedure Programming
SOFTWARE EVOLUTION Object Oriented Programming Procedure Programming Assembly Language Machine Language 1, 0 Layers of software technology

14 A LOOK AT PROCEDURE-ORIENTED PROGRAMMING
Main Program Function 1 Function 8 Function 6 Function 4 Function 5 Function 3 Function 2 Function 7

15 Global Data Function 1 Local Data Some characteristics: Emphasis is on doing things (algorithms) Large programs are devided into smaller programs known as function/ subrutin Most of the function share global data Data move openly around the system from function to function

16 OOP PARADIGM DATA FUNCTIONS OBJECT A OBJECT C OBJECT B

17 BASIC CONCEPTS OF OOP OBJECTS CLASSES DATA ABSTRACTION ENCAPSULATION
INHERITANCE POLYMORPHISM DYNAMIC BINDING MESSAGE PASSING

18 Some of OOP’s striking features:
Emphasis is on data rather than procedure. Programs are divided into objects. Data structures are designed such that they characterize the objects. Functions are tied together in the data structures. Data is hidden and can not be accessed by external functions.

19 CLASSES Is the user defined data types
A collection of objects of similar type Example: Object mango, apple, and orange is member of class fruit Object TF, TI, TK, TP is member of class Jurusan Object jip, sedan, bus, truk is member of class mobil

20 OBJECTS Is the variables of program
Have a life cycle. They can be created and destroyed. Interacts by sending message to one another Contains data and code/ function to manipulate the data

21 Representing notations:
Object: STUDENT DATA: Name Date-of-Birth Marks …. FUNCTIONS: Total Average Display STUDENT

22 DATA ABSTRACTION The act of representing essential features without including the background details or explanations. Defined as list of attributes and functions. Known as Abstract Data Types (ADT).

23 ENCAPSULATION Wrapping up of data and functions into a single unit (called class). The data is not accessible to the outside world and only functions which are wrapped in the class can access it. Insulation of the data from direct access by the program is called data hiding

24 INHERITANCE Is the process by which objects of one class acquire the properties of objects of another class. Supports the concepts of hierarchical classification. Provides the idea of reusability. Example: the bird robin is a part of the class flying bird which is again a part of the class bird.

25 Bird Attributes: Feathers Lay eggs Flying Bird _________ Non Flying Bird Robin Swallow Penguin Kiwi

26 POLYMORPHISM The ability to take more than one form.
An operation may exhibit different behaviour in different instances depends upon the data types used in the operation. Example: addition operation If two numbers, will generate a sum If two strings, will generate a concatenation Extensively used in implementing inheritance

27 Shape Draw ( ) Box Object Triangle Object Circle Object

28 DYNAMIC BINDING The code asociated with a given procedure call is not known until the time of the call at run time. Associated with polymorphism and inheritance. Example: (above diagram) Unique to each object and so the draw procedure will be redefined in each class that defines the object. At run-time, the code matching the object under current reference will be called.

29 MESSAGE PASSING Object oriented program consist of a set of objects communicate with each. Steps: Creating classes that define objects and their behaviour. Creating objects from class definitions. Establishing communication among objects. Objects communicate with one another by sending and receiving information. Message passing involves: object’s name, function’s name (message) and information

30 BENEFITS OF OOP Through inheritance, we can eliminate redundant code and extend the use of existing classes. The principle of data hiding helps the programmer to build secure programs. Can be easily upgraded from small to large systems. Software complexity can be easily managed.


Download ppt "OBJECT ORIENTED PROGRAMMING Using C++"

Similar presentations


Ads by Google