SlideShare a Scribd company logo
class Employee{
protected float salary=40000;
Public void cetakGaji(){
System.out.println(“gaji : ”+salary);
}
}
class Programmer extends Employee{
private float bonus=10000;
Public void cetakTotalGaji(){
System.out.println(“gaji : ”+salary);
}
}
public static void main(String args[]){
Programmer p=new Programmer();
p.cetakGaji();
p.cetakTotalGaji();
}
Object Oriented Programing - Inheritance
Object Oriented Programing - Inheritance

More Related Content

What's hot

ADA FILE
ADA FILEADA FILE
ADA FILE
Gaurav Singh
 
C sharp 8
C sharp 8C sharp 8
C sharp 8
Germán Küber
 
Stl algorithm-Basic types
Stl algorithm-Basic typesStl algorithm-Basic types
Stl algorithm-Basic types
mohamed sikander
 
Pads lab manual final
Pads lab manual finalPads lab manual final
Pads lab manual final
AhalyaR
 
Document
DocumentDocument
Document
AjitRaj12
 
DAA Lab File C Programs
DAA Lab File C ProgramsDAA Lab File C Programs
DAA Lab File C Programs
Kandarp Tiwari
 
design and analysis of algorithm Lab files
design and analysis of algorithm Lab filesdesign and analysis of algorithm Lab files
design and analysis of algorithm Lab files
Nitesh Dubey
 
Lightning Talk - Introduce to iOS 7
Lightning Talk - Introduce to iOS 7Lightning Talk - Introduce to iOS 7
Lightning Talk - Introduce to iOS 7
Rafael Sperling
 
Inheritance and polymorphism
Inheritance and polymorphismInheritance and polymorphism
Inheritance and polymorphism
mohamed sikander
 
Solutionsfor co2 C Programs for data structures
Solutionsfor co2 C Programs for data structuresSolutionsfor co2 C Programs for data structures
Solutionsfor co2 C Programs for data structures
Lakshmi Sarvani Videla
 
C programs
C programsC programs
C Prog. - Structures
C Prog. - StructuresC Prog. - Structures
C Prog. - Structures
vinay arora
 
C Prog - Strings
C Prog - StringsC Prog - Strings
C Prog - Strings
vinay arora
 
C questions
C questionsC questions
C questions
mohamed sikander
 
Formal methods
Formal methods Formal methods
Formal methods
Shoaib Haseeb
 
Implementing string
Implementing stringImplementing string
Implementing string
mohamed sikander
 
Implementing stack
Implementing stackImplementing stack
Implementing stack
mohamed sikander
 
4. chapter iii
4. chapter iii4. chapter iii
4. chapter iii
Chhom Karath
 
3. chapter ii
3. chapter ii3. chapter ii
3. chapter ii
Chhom Karath
 
ECMAScript 5: Новое в JavaScript
ECMAScript 5: Новое в JavaScriptECMAScript 5: Новое в JavaScript

What's hot (20)

ADA FILE
ADA FILEADA FILE
ADA FILE
 
C sharp 8
C sharp 8C sharp 8
C sharp 8
 
Stl algorithm-Basic types
Stl algorithm-Basic typesStl algorithm-Basic types
Stl algorithm-Basic types
 
Pads lab manual final
Pads lab manual finalPads lab manual final
Pads lab manual final
 
Document
DocumentDocument
Document
 
DAA Lab File C Programs
DAA Lab File C ProgramsDAA Lab File C Programs
DAA Lab File C Programs
 
design and analysis of algorithm Lab files
design and analysis of algorithm Lab filesdesign and analysis of algorithm Lab files
design and analysis of algorithm Lab files
 
Lightning Talk - Introduce to iOS 7
Lightning Talk - Introduce to iOS 7Lightning Talk - Introduce to iOS 7
Lightning Talk - Introduce to iOS 7
 
Inheritance and polymorphism
Inheritance and polymorphismInheritance and polymorphism
Inheritance and polymorphism
 
Solutionsfor co2 C Programs for data structures
Solutionsfor co2 C Programs for data structuresSolutionsfor co2 C Programs for data structures
Solutionsfor co2 C Programs for data structures
 
C programs
C programsC programs
C programs
 
C Prog. - Structures
C Prog. - StructuresC Prog. - Structures
C Prog. - Structures
 
C Prog - Strings
C Prog - StringsC Prog - Strings
C Prog - Strings
 
C questions
C questionsC questions
C questions
 
Formal methods
Formal methods Formal methods
Formal methods
 
Implementing string
Implementing stringImplementing string
Implementing string
 
Implementing stack
Implementing stackImplementing stack
Implementing stack
 
4. chapter iii
4. chapter iii4. chapter iii
4. chapter iii
 
3. chapter ii
3. chapter ii3. chapter ii
3. chapter ii
 
ECMAScript 5: Новое в JavaScript
ECMAScript 5: Новое в JavaScriptECMAScript 5: Новое в JavaScript
ECMAScript 5: Новое в JavaScript
 

Viewers also liked

Dynamics Telephony Dialer Intro
Dynamics Telephony Dialer IntroDynamics Telephony Dialer Intro
Dynamics Telephony Dialer Intro
Eddie Steede
 
Object Oriented Programing - Polymrphism
Object Oriented Programing - PolymrphismObject Oriented Programing - Polymrphism
Object Oriented Programing - Polymrphism
Bayu Firmawan Paoh
 
Object Oriented Programing - Intro
Object Oriented Programing - IntroObject Oriented Programing - Intro
Object Oriented Programing - Intro
Bayu Firmawan Paoh
 
Aspect Oriented Programing - Introduction
Aspect Oriented Programing - IntroductionAspect Oriented Programing - Introduction
Aspect Oriented Programing - Introduction
Venkaiah Chowdary Koneru
 
Object Oriented Programing in JavaScript
Object Oriented Programing in JavaScriptObject Oriented Programing in JavaScript
Object Oriented Programing in JavaScript
Akshay Mathur
 
object oriented programing lecture 1
object oriented programing lecture 1object oriented programing lecture 1
object oriented programing lecture 1
Geophery sanga
 
Introduction to compilers
Introduction to compilersIntroduction to compilers
Introduction to compilers
Bilal Maqbool ツ
 
India Legal 31 August 2016
India Legal 31 August 2016 India Legal 31 August 2016
India Legal 31 August 2016
ENC
 
Programing paradigm & implementation
Programing paradigm & implementationPrograming paradigm & implementation
Programing paradigm & implementation
Bilal Maqbool ツ
 
Aspect Oriented Programming (AOP) - A case study in Android
Aspect Oriented Programming (AOP) - A case study in AndroidAspect Oriented Programming (AOP) - A case study in Android
Aspect Oriented Programming (AOP) - A case study in Android
Carlos Anjos
 

Viewers also liked (10)

Dynamics Telephony Dialer Intro
Dynamics Telephony Dialer IntroDynamics Telephony Dialer Intro
Dynamics Telephony Dialer Intro
 
Object Oriented Programing - Polymrphism
Object Oriented Programing - PolymrphismObject Oriented Programing - Polymrphism
Object Oriented Programing - Polymrphism
 
Object Oriented Programing - Intro
Object Oriented Programing - IntroObject Oriented Programing - Intro
Object Oriented Programing - Intro
 
Aspect Oriented Programing - Introduction
Aspect Oriented Programing - IntroductionAspect Oriented Programing - Introduction
Aspect Oriented Programing - Introduction
 
Object Oriented Programing in JavaScript
Object Oriented Programing in JavaScriptObject Oriented Programing in JavaScript
Object Oriented Programing in JavaScript
 
object oriented programing lecture 1
object oriented programing lecture 1object oriented programing lecture 1
object oriented programing lecture 1
 
Introduction to compilers
Introduction to compilersIntroduction to compilers
Introduction to compilers
 
India Legal 31 August 2016
India Legal 31 August 2016 India Legal 31 August 2016
India Legal 31 August 2016
 
Programing paradigm & implementation
Programing paradigm & implementationPrograming paradigm & implementation
Programing paradigm & implementation
 
Aspect Oriented Programming (AOP) - A case study in Android
Aspect Oriented Programming (AOP) - A case study in AndroidAspect Oriented Programming (AOP) - A case study in Android
Aspect Oriented Programming (AOP) - A case study in Android
 

More from Bayu Firmawan Paoh

[Seminar] ANALISIS KORELASI VARIABEL KONDISI LINGKUNGAN KANDANG TERHADAP KUAL...
[Seminar] ANALISIS KORELASI VARIABEL KONDISI LINGKUNGAN KANDANG TERHADAP KUAL...[Seminar] ANALISIS KORELASI VARIABEL KONDISI LINGKUNGAN KANDANG TERHADAP KUAL...
[Seminar] ANALISIS KORELASI VARIABEL KONDISI LINGKUNGAN KANDANG TERHADAP KUAL...
Bayu Firmawan Paoh
 
Object Oriented Programing-Intro
Object Oriented Programing-IntroObject Oriented Programing-Intro
Object Oriented Programing-Intro
Bayu Firmawan Paoh
 
Object Oriented Programing - Generic Programing
Object Oriented Programing - Generic ProgramingObject Oriented Programing - Generic Programing
Object Oriented Programing - Generic Programing
Bayu Firmawan Paoh
 
Presentation facade design pattern
Presentation facade design patternPresentation facade design pattern
Presentation facade design pattern
Bayu Firmawan Paoh
 
Make Recyclerview With Android Studio
Make Recyclerview With Android StudioMake Recyclerview With Android Studio
Make Recyclerview With Android Studio
Bayu Firmawan Paoh
 
Android fundamental development
Android fundamental developmentAndroid fundamental development
Android fundamental development
Bayu Firmawan Paoh
 
Basic Android Layout
Basic Android LayoutBasic Android Layout
Basic Android Layout
Bayu Firmawan Paoh
 
Android - Getting Started With Firebase Auth
Android - Getting Started With Firebase AuthAndroid - Getting Started With Firebase Auth
Android - Getting Started With Firebase Auth
Bayu Firmawan Paoh
 
Basic Scala
Basic ScalaBasic Scala
Basic Scala
Bayu Firmawan Paoh
 
How to make e-commerce with oscmax
How to make e-commerce with oscmaxHow to make e-commerce with oscmax
How to make e-commerce with oscmax
Bayu Firmawan Paoh
 

More from Bayu Firmawan Paoh (10)

[Seminar] ANALISIS KORELASI VARIABEL KONDISI LINGKUNGAN KANDANG TERHADAP KUAL...
[Seminar] ANALISIS KORELASI VARIABEL KONDISI LINGKUNGAN KANDANG TERHADAP KUAL...[Seminar] ANALISIS KORELASI VARIABEL KONDISI LINGKUNGAN KANDANG TERHADAP KUAL...
[Seminar] ANALISIS KORELASI VARIABEL KONDISI LINGKUNGAN KANDANG TERHADAP KUAL...
 
Object Oriented Programing-Intro
Object Oriented Programing-IntroObject Oriented Programing-Intro
Object Oriented Programing-Intro
 
Object Oriented Programing - Generic Programing
Object Oriented Programing - Generic ProgramingObject Oriented Programing - Generic Programing
Object Oriented Programing - Generic Programing
 
Presentation facade design pattern
Presentation facade design patternPresentation facade design pattern
Presentation facade design pattern
 
Make Recyclerview With Android Studio
Make Recyclerview With Android StudioMake Recyclerview With Android Studio
Make Recyclerview With Android Studio
 
Android fundamental development
Android fundamental developmentAndroid fundamental development
Android fundamental development
 
Basic Android Layout
Basic Android LayoutBasic Android Layout
Basic Android Layout
 
Android - Getting Started With Firebase Auth
Android - Getting Started With Firebase AuthAndroid - Getting Started With Firebase Auth
Android - Getting Started With Firebase Auth
 
Basic Scala
Basic ScalaBasic Scala
Basic Scala
 
How to make e-commerce with oscmax
How to make e-commerce with oscmaxHow to make e-commerce with oscmax
How to make e-commerce with oscmax
 

Recently uploaded

HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 

Recently uploaded (20)

HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 

Object Oriented Programing - Inheritance

  • 1.
  • 2.
  • 3.
  • 4. class Employee{ protected float salary=40000; Public void cetakGaji(){ System.out.println(“gaji : ”+salary); } } class Programmer extends Employee{ private float bonus=10000; Public void cetakTotalGaji(){ System.out.println(“gaji : ”+salary); } } public static void main(String args[]){ Programmer p=new Programmer(); p.cetakGaji(); p.cetakTotalGaji(); }