Chapter 1

Basic OOP Concept
Basic Concept
Object
Class
Inheritence
Polimorphism
Encapsulation
Data Abstraction

Dyah Fajar Nur Rohmah
Class
In OO model, some of the objects
exhibits identical characteristics
(information structure and
behavior)
Structure t...
Object
Instance of classes
A person, place or concept
Has attributes, state and behavior
Interact sending message to each
...
Example - Class
Dimas studies mathematics
Femy studies software engineering
Ganang studies computer science
Each one is a ...
Struktur Class
class car {

Nama class

int fuel; int maxSpeed;
     public car() {
MaxSpeed=0;
}
refuel() {
}
    SetSpee...
Declaration of an object

class Rectangle {
      int width;
      int height;
   public void set
     (int w, int l){
   ...
Let's write some codes...

Dyah Fajar Nur Rohmah
Upcoming SlideShare
Loading in...5
×

Chapter1 Introduction to OOP (Java)

205
-1

Published on

Introduction to OOP (Java)

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
205
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
15
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Chapter1 Introduction to OOP (Java)

  1. 1. Chapter 1 Basic OOP Concept
  2. 2. Basic Concept Object Class Inheritence Polimorphism Encapsulation Data Abstraction Dyah Fajar Nur Rohmah
  3. 3. Class In OO model, some of the objects exhibits identical characteristics (information structure and behavior) Structure that contains common data and function as entity for object Dyah Fajar Nur Rohmah
  4. 4. Object Instance of classes A person, place or concept Has attributes, state and behavior Interact sending message to each other Dyah Fajar Nur Rohmah
  5. 5. Example - Class Dimas studies mathematics Femy studies software engineering Ganang studies computer science Each one is a Student These are called object of the Student class Dyah Fajar Nur Rohmah
  6. 6. Struktur Class class car { Nama class int fuel; int maxSpeed;      public car() { MaxSpeed=0; } refuel() { }     SetSpeed(){     } } Dyah Fajar Nur Rohmah method attributes constructor
  7. 7. Declaration of an object class Rectangle {       int width;       int height;    public void set      (int w, int l){    } } main() {    Rectangle rect1;    Rectangle rect2;    rect1.set(4,9);    rect2.set(5,8); } Rect1 → width = 4 and length = 9 Rect2 → width = 5 and length = 8 Dyah Fajar Nur Rohmah
  8. 8. Let's write some codes... Dyah Fajar Nur Rohmah
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×