Review :: Kisi-kisi UTS ::

Slides:



Advertisements
Presentasi serupa
Other OOP Basic Viska Mutiawani, M.Sc. Konsep penting Method overloading Encapsulation this keyword final static.
Advertisements

Fungsi Friend Dalam bahasa C++ kita dapat membuat suatu fungsi yang berada di luar kelas (class) dan dapat meng-ak-ses bagian private suatu kelas. Fungsi.
Modul 14 – Hendi Hermawan - 1
Pemrograman Berbasis Objek
Workshop SCS: Java Game Programming
BAB III – CLASS (1) DIKTAT PBO Oleh: Adam Mukharil B. S.Kom.
Pertemuan 2 – Manipulasi String PEMINATAN PROGRAMMING & DESAIN GRAFIS SMAK ST. LOUIS 2 SURABAYA POWERED BY PUEDE EDUCATION.
Lecture 2 Introduction to C# - Object Oriented Sandy Ardianto & Erick Pranata © Sekolah Tinggi Teknik Surabaya 1.
di OBJECT ORIENTED PROGRAMMING [OOP] Oleh H. SUMIJAN, Ir, M.Sc
OBJECT ORIENTED PROGRAMMING
Function.
Inheritance (Pewarisan)
3 Variabel, Konstanta Tipe Data dan dalam Bahasa C/C++ Java dan Bab
ARRAY Dr. Lily Wulandari.
PENGENALAN c++ DAN STRUKTUR DASAR C++
Review-Dasar Pemrograman Komputer
MINGGU 5 Java Programming (MKB614C)
OPERATOR OVERLOADING The ability to provide the operators with a special meaning for a data type but its original meaning is not lost. Example: Operator.
Class, Inheritance, Encapsulation & Interface
Pemrograman Aplikasi Bergerak
Lecture 2 Object-oriented Programming Concepts Erick Pranata © Sekolah Tinggi Teknik Surabaya 1.
Pemrograman Berorientasi Obyek Oleh Tita Karlita
Class.
Pemrograman Berorientasi Obyek
Class Member Access Control
OBJECT ORIENTED PROGRAMMING YANES HARDIANTO SUI Politeknik Manufaktur Astra 2011.
Pertemuan 7 inheritance.
Enkapsulasi Pemrograman Berorientasi Obyek Oleh Tita Karlita.
Fungsi Fungsi.
Function User Function.
Class and Object Introduction Specifying a Class Defining Member Function A C++ Program with Class Nesting of Member Functions Private Member Functions.
1 Pertemuan 6 Encapsulation Lanjutan Matakuliah: T0044/Pemrograman Berorientasi Obyek Tahun: 2005 Versi: 1.0.
Teknik Pemrograman Terstruktur Linked lis & Inheritance 1/12 Pointer (Lanjutan…) Pemrograman Berorientasi Objek.
Pemrograman Berorientasi Obyek1 Sub Pokok Bahasan Pointer. Reference. Function Passing Parameter by Value, by Reference, by Pointer.
Bab 05 Tipe Data dan Mengisi Variabel
FUNCTIONS Pertemuan 9 Matakuliah: T0456 / Algoritma dan Metode Object Oriented Programming Tahun: 2007.
1 Pertemuan 9 Inheritance Matakuliah: T0044/Pemrograman Berorientasi Obyek Tahun: 2005 Versi: 1.0.
Class and Object Matakuliah : XXXX / Algoritma dan Metode Object Oriented Programming II Pertemuan : 2 Tahun : 2008 Versi : 1/0.
INHERITANCE (Oleh : Nur Hayatin, S.ST)
METHOD, ARRAY DAN STRING
OOP Java Minggu 2b Dasar OOP. Class (1) Deklarasi class : [ *] class { [ *] } Cat : [] = optional, * = repeat 0-N.
Matakuliah : T0044/Pemrograman Berorientasi Obyek
1 Pertemuan 5 Encapsulation Matakuliah: T0044/Pemrograman Berorientasi Obyek Tahun: 2005 Versi: 1.0.
1 Pertemuan 10 Pemrograman Berorientasi Objek Matakuliah: >/ > Tahun: > Versi: >
Bayu Priyambadha, S.Kom.  Classes, which are the "blueprints" for an object and are the actual code that defines the properties and methods.  Objects,
Kontrak Kuliah Pengenalan OOP
Perancangan dan Pemrograman Web
Enkapsulasi.
PHP - Pemrograman Berorientasi Obyek
Inheritance (2).
Access Modifier.
Pertemuan 4 Class, object & Variable
Association, Composition dan Inheritance
C++ static.
Konsep Dasar Pemrograman Berorientasi Objek
Pemrograman Berorientsi Objek Pertemuan 15
Membuat Kelas.
Objects in Java U Abd. Rohim, MT mailto:
Class.
PBO Lanjutan Membuat Kelas.
Matakuliah : M0074/PROGRAMMING II Tahun : 2005 Versi : 1/0
Pemrograman Berorientasi Obyek dengan PHP
DIAN PRAJARINI, S.T.,M.Eng ROSITA YANUARTI, S.Kom.,M.Cs
C++ Polymorphism.
(Object Oriented Programming)
Pemrograman Berbasis Objek
@kovazzevic | SMKN 24 Jakarta
DPH1C4 Pemrograman berorientasi Obyek
CLASS VS OBJECT INTRODUCTION OF CLASS. keyword class diikuti dengan nama class yang kita inginkan. Lebih baik digunakan kata yang diawali huruf.
Bahasa Pemrograman (Pemrograman Visual)
Transcript presentasi:

Review :: Kisi-kisi UTS :: Pertemuan 5 Review :: Kisi-kisi UTS ::

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

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

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

CLASSES & OBJECTS SPECIFYING A CLASS class class_name { private: variable_declarations; function_declarations; public: } Keywords private and public known as visibility labels. private can be accessed only from within the class. Data member/ Variable is commonly private. public can be accessed from outside the class. Member function is commonly public.

Class Data/ Variabel Private Area No Entry ! Function/ Method Public Area Data/ Variabel Function/ Method Entry Allowed

Konversi Prosedural ke OOP Pastikan program sudah terbagi menjadi fungsi-fungsi/ modular. Identifikasi class yang bisa dibuat. Identifikasi data member dan member function untuk class yang bersangkutan. Tentukan bagian private dan public class (sesuaikan dengan skenario fungsi utama). Buat fungsi utamanya (void main()). Membuat obyek dari class. Menjalankan bagian public dari class.

//PROCEDURAL PROGRAMMING #include “stdio.h” void main() #include “iostream.h” class balok { private : int p, l, t, volume; public : void input(void) { printf(“Masukkan P = “); scanf(“%d”, &p); printf(“Masukkan L = “); scanf(“%d”, &l); printf(“Masukkan T = “); scanf(“%d”, &t); }; void hitung(void) { volume = p * l * t; }; void output(void) { printf(“Volume = %d\n”, volume); }; void main() { balok balokku; printf(“Program Balok\n”); balokku.input(); balokku.hitung(); balokku.output(); } //PROCEDURAL PROGRAMMING #include “stdio.h” void main() { int p, l, t, volume; printf(“Program Balok\n”); printf(“Masukkan P = “); scanf(“%d”, &p); printf(“Masukkan L = “); scanf(“%d”, &l); printf(“Masukkan T = “); scanf(“%d”, &t); volume = p * l * t; printf(“Volume = %d\n”, volume); }

Constructors and Destructors Parameterized Constructors Multiple Constructors Constructors with Default Arguments Copy Constructors Destructors

Simple Constructor & destructor #include<iostream.h> class coba { int kode; public : coba() { cout << "Kode = "<< kode << endl; cout << "konstruktor dijalankan...\n"; kode = 1; }; ~coba() { cout << "destruktor dijalankan...\n"; cout << "Kode = "<< kode << endl; void show() void main() { coba cobaku; cobaku.show(); }