SlideShare a Scribd company logo
Object Oriented Programming Teguh Sutanto  Si  | STIKOM Surabaya teguh@stikom.edu|+628563076813|http://teguhsutanto.blogspot.com|http://blog.stikom.edu/teguh
GOAL Students can understand the Object Oriented Programming concepts  Students can make a program in accordance with the rules of Object Oriented Programming
 
Object-oriented programming (OOP)  is a programming paradigm using "objects" – data structures consisting of data fields  and methods together with their  interactions – to design applications and computer programs
Object-oriented programming (OOP) is a programming language model organized around "objects" rather than "actions" and data rather than logic. Historically, a program has been viewed as a logical procedure that takes input data, processes it, and produces output data
Why OOP? Object-oriented systems can be easily upgraded from small to large scale. It is easy to partition the work in a project based on objects. Object-oriented programming offers a new and powerful model for writing computer software. It reduces software maintenance and developing costs.  Changes in user requirements or later developments have always been a major problem.  Object-orientation or object oriented programming (OOP) should help one in developing high quality software easily.
Concept of Class and Object “ Class” refers to a blueprint. It defines the variables and methods the objects support “ Object” is an instance of a class. Each object has a class which defines its data and behavior
Concept of Class and Object
Classes reflect concepts, objects reflect instances that embody those concepts Daria Jane Brittany Jodie girl class object
 
 
Class: A class can have three kinds of members:
Attribute/Field/Data Method
Field Declaration a type name followed by the field name, and optionally an initialization clause primitive data type vs. Object reference boolean, char, byte, short, int, long, float, double field declarations can be preceded by different modifiers access control modifiers static final
Acces Control Modifier private :  private members are accessible only in the class itself package :  package members are accessible in classes in the same package and the class itself protected :  protected members are accessible in classes in the same package, in subclasses of the class, and in the class itself public :  public members are accessible anywhere the class is accessible
com Person name: String address: String # age: int +getName(): String Employee HRD X MainMenu X
public class Pencil { public String color = “red”; public int length; public float diameter; private float price; public static long nextID = 0; public void setPrice (float newPrice) { price = newPrice; } } public class CreatePencil { public static void main (String args[]){ Pencil p1 = new Pencil(); p1.price = 0.5f;  } } Pencil.java CreatePencil.java %> javac Pencil.java %> javac CreatePencil.java CreatePencil.java:4: price has private access in Pencil p1.price = 0.5f; ^
 

More Related Content

PPT
Encapsulation
PDF
PPTX
CPP14 - Encapsulation
PPT
Oop concepts
PDF
Data Structure Interview Questions & Answers
PPTX
[OOP - Lec 08] Encapsulation (Information Hiding)
PPTX
Encapsulation
PPTX
2CPP09 - Encapsulation
Encapsulation
CPP14 - Encapsulation
Oop concepts
Data Structure Interview Questions & Answers
[OOP - Lec 08] Encapsulation (Information Hiding)
Encapsulation
2CPP09 - Encapsulation

What's hot (20)

PPTX
concept of oops
PPTX
Understanding class, object & interface
PPTX
Very short OOP Introduction
PPTX
Encapsulation C++
PPSX
Concept of Object Oriented Programming
PPT
PPTX
Oops in vb
PPTX
General oops concepts
PPT
Object Oriented Programming In .Net
PPTX
Encapsulation
PPTX
Advance oops concepts
PPTX
Encapsulation of operations, methods & persistence
PPTX
Vb ch 3-object-oriented_fundamentals_in_vb.net
PPTX
Std 12 computer chapter 6 object oriented concepts (part 1)
PPT
Oop concept
PPTX
Lecture01 object oriented-programming
PPT
Pemrograman komputer 3 (representasi data)
PPT
1207028 634528828886611250
PPTX
encapsulation
concept of oops
Understanding class, object & interface
Very short OOP Introduction
Encapsulation C++
Concept of Object Oriented Programming
Oops in vb
General oops concepts
Object Oriented Programming In .Net
Encapsulation
Advance oops concepts
Encapsulation of operations, methods & persistence
Vb ch 3-object-oriented_fundamentals_in_vb.net
Std 12 computer chapter 6 object oriented concepts (part 1)
Oop concept
Lecture01 object oriented-programming
Pemrograman komputer 3 (representasi data)
1207028 634528828886611250
encapsulation
Ad

Viewers also liked (8)

PDF
Mochamad Yusuf Profile
PDF
Hidden prob crouchsolv-chi2015
PPT
Ch 21 computer and your health
PPTX
Wisuda Stiki December 2014
PDF
Prosiding international stiki malang (koko wahyu prasetyo, setiabudi sakaria)
PDF
Developing Computer-based Educational Game to support Cooperative Learning St...
PDF
Introduction to ipython notebook
PDF
Windows 10: The Good, The Bad, The New
Mochamad Yusuf Profile
Hidden prob crouchsolv-chi2015
Ch 21 computer and your health
Wisuda Stiki December 2014
Prosiding international stiki malang (koko wahyu prasetyo, setiabudi sakaria)
Developing Computer-based Educational Game to support Cooperative Learning St...
Introduction to ipython notebook
Windows 10: The Good, The Bad, The New
Ad

Similar to OOP_1_TEG (20)

PPTX
Introduction to OOPs second year cse.pptx
PPTX
Ch.1 oop introduction, classes and objects
PDF
Lecture 01 - Basic Concept About OOP With Python
PPT
PPTX
Object Oriented Programming
PPT
Synapseindia strcture of dotnet development part 1
PPT
Lecture01
PPT
PDF
Bt8901 objective oriented systems1
PPT
C++(introduction)
PPTX
UNIT1-JAVA.pptx
PPT
C++ basic intro on c++ programming language ppt
PPT
the education purpose of software C++.ppt
PPTX
OOPJ.pptx
PPT
C++Day-1 Introduction.ppt
PPTX
Principles of oop
PDF
Oops concepts
PPTX
basics of c++ object oriented programming l anguage
Introduction to OOPs second year cse.pptx
Ch.1 oop introduction, classes and objects
Lecture 01 - Basic Concept About OOP With Python
Object Oriented Programming
Synapseindia strcture of dotnet development part 1
Lecture01
Bt8901 objective oriented systems1
C++(introduction)
UNIT1-JAVA.pptx
C++ basic intro on c++ programming language ppt
the education purpose of software C++.ppt
OOPJ.pptx
C++Day-1 Introduction.ppt
Principles of oop
Oops concepts
basics of c++ object oriented programming l anguage

Recently uploaded (20)

PPTX
OMC Textile Division Presentation 2021.pptx
PDF
Mushroom cultivation and it's methods.pdf
PDF
Getting Started with Data Integration: FME Form 101
PDF
Encapsulation theory and applications.pdf
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
DP Operators-handbook-extract for the Mautical Institute
PPTX
Tartificialntelligence_presentation.pptx
PDF
project resource management chapter-09.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
August Patch Tuesday
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PPTX
1. Introduction to Computer Programming.pptx
PDF
Enhancing emotion recognition model for a student engagement use case through...
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Heart disease approach using modified random forest and particle swarm optimi...
OMC Textile Division Presentation 2021.pptx
Mushroom cultivation and it's methods.pdf
Getting Started with Data Integration: FME Form 101
Encapsulation theory and applications.pdf
Web App vs Mobile App What Should You Build First.pdf
1 - Historical Antecedents, Social Consideration.pdf
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
A comparative analysis of optical character recognition models for extracting...
DP Operators-handbook-extract for the Mautical Institute
Tartificialntelligence_presentation.pptx
project resource management chapter-09.pdf
Programs and apps: productivity, graphics, security and other tools
August Patch Tuesday
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
SOPHOS-XG Firewall Administrator PPT.pptx
1. Introduction to Computer Programming.pptx
Enhancing emotion recognition model for a student engagement use case through...
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Heart disease approach using modified random forest and particle swarm optimi...

OOP_1_TEG

  • 1. Object Oriented Programming Teguh Sutanto Si | STIKOM Surabaya teguh@stikom.edu|+628563076813|http://teguhsutanto.blogspot.com|http://blog.stikom.edu/teguh
  • 2. GOAL Students can understand the Object Oriented Programming concepts Students can make a program in accordance with the rules of Object Oriented Programming
  • 3.  
  • 4. Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs
  • 5. Object-oriented programming (OOP) is a programming language model organized around "objects" rather than "actions" and data rather than logic. Historically, a program has been viewed as a logical procedure that takes input data, processes it, and produces output data
  • 6. Why OOP? Object-oriented systems can be easily upgraded from small to large scale. It is easy to partition the work in a project based on objects. Object-oriented programming offers a new and powerful model for writing computer software. It reduces software maintenance and developing costs. Changes in user requirements or later developments have always been a major problem. Object-orientation or object oriented programming (OOP) should help one in developing high quality software easily.
  • 7. Concept of Class and Object “ Class” refers to a blueprint. It defines the variables and methods the objects support “ Object” is an instance of a class. Each object has a class which defines its data and behavior
  • 8. Concept of Class and Object
  • 9. Classes reflect concepts, objects reflect instances that embody those concepts Daria Jane Brittany Jodie girl class object
  • 10.  
  • 11.  
  • 12. Class: A class can have three kinds of members:
  • 14. Field Declaration a type name followed by the field name, and optionally an initialization clause primitive data type vs. Object reference boolean, char, byte, short, int, long, float, double field declarations can be preceded by different modifiers access control modifiers static final
  • 15. Acces Control Modifier private : private members are accessible only in the class itself package : package members are accessible in classes in the same package and the class itself protected : protected members are accessible in classes in the same package, in subclasses of the class, and in the class itself public : public members are accessible anywhere the class is accessible
  • 16. com Person name: String address: String # age: int +getName(): String Employee HRD X MainMenu X
  • 17. public class Pencil { public String color = “red”; public int length; public float diameter; private float price; public static long nextID = 0; public void setPrice (float newPrice) { price = newPrice; } } public class CreatePencil { public static void main (String args[]){ Pencil p1 = new Pencil(); p1.price = 0.5f; } } Pencil.java CreatePencil.java %> javac Pencil.java %> javac CreatePencil.java CreatePencil.java:4: price has private access in Pencil p1.price = 0.5f; ^
  • 18.  

Editor's Notes

  • #3: Good afternoon gentlemen and ladies, I'm so glad to be here. Today we will discuss about OOP. OOP is one of the main courses in the department of information systems. OOP is a new paradigm in programming techniques, almost all programming languages are currently using OOP concepts. The purpose of this course is students can understand the OOP concepts and they can make a program in accordance with the rules of OOP Okay, let's look at our topic today. I'll start from the definition of OOP, the reason why you should use OOP, classes and objects, and access modifier Let's look at the definition of OOP. There are many definitions of OOP. Are there any questions? Well, our class is finished, see you next week. Next week we will discuss about the making method and relationships between classes thank you, happy to learn OOP and success for all of us