SlideShare una empresa de Scribd logo
1 de 12
Presentation
Presented by:
Ghazanfar Ali (FA15-BEE-012)
Topic:
Abstract Class and Concrete Class
Contents:
 Abstract Class
Abstract Class Program
 Concrete Class
Concrete Class Program
 Relation between Abstract Class and Concrete Class
 Program output
Abstract Class
 Abstract class is just like other classes but it marks with abstract
keyword.
 Classes that contain one or more abstract methods
 An abstract method is that which is declared but contains no
implementation.
 A method can be made abstract if we add the keyword “abstract”
to it
 Abstract classes may not be instantiated, and require subclasses to
provide implementations for the abstract methods
 These subclasses are also known as child class or derived class.
 Now here is a simple program of an Abstract class
Abstract Class Program
Why we use abstract class?
 The purpose of an abstract class is to provide a common
definition of a base class that multiple derived classes can
share.
 For example; we were modeling the behavior of animals.
Animals are capable of doing different things. Some
common operations are performed by all animals, but in a
different way as well as like the sounds they make.
 And we can simply do this by overriding.
Concrete Class
 Default class in java
 A derived class that provides the basic implementations for all of
the methods that are not already implemented in the base class.
 The concrete class is the implementation of an abstract class
methods.
 We can also call concrete methods of abstract class in concrete
class objects.
Concrete Class Program
Why we use Concrete Class?
 The implementation of an Abstract class.
 In concrete class (child or derived class) you can
call the methods of abstract class by overriding the
methods of abstract class and then in main method
we call the objects of concrete class which gives us
the implementation of abstract class.
Test Class
Output
Relation Between Abstract and Concrete Class
 So
Parent Class
Child Class
Abstract Class Presentation

Más contenido relacionado

La actualidad más candente

Abstraction in java
Abstraction in javaAbstraction in java
Abstraction in java
sawarkar17
 
Classes, objects in JAVA
Classes, objects in JAVAClasses, objects in JAVA
Classes, objects in JAVA
Abhilash Nair
 

La actualidad más candente (20)

Abstract Class & Abstract Method in Core Java
Abstract Class & Abstract Method in Core JavaAbstract Class & Abstract Method in Core Java
Abstract Class & Abstract Method in Core Java
 
Java interfaces
Java interfacesJava interfaces
Java interfaces
 
Java static keyword
Java static keywordJava static keyword
Java static keyword
 
Interface in java By Dheeraj Kumar Singh
Interface in java By Dheeraj Kumar SinghInterface in java By Dheeraj Kumar Singh
Interface in java By Dheeraj Kumar Singh
 
Java interfaces & abstract classes
Java interfaces & abstract classesJava interfaces & abstract classes
Java interfaces & abstract classes
 
Abstract class in java
Abstract class in javaAbstract class in java
Abstract class in java
 
Java Exception handling
Java Exception handlingJava Exception handling
Java Exception handling
 
Applets in java
Applets in javaApplets in java
Applets in java
 
Ppt on this and super keyword
Ppt on this and super keywordPpt on this and super keyword
Ppt on this and super keyword
 
Basic concept of OOP's
Basic concept of OOP'sBasic concept of OOP's
Basic concept of OOP's
 
Python-Encapsulation.pptx
Python-Encapsulation.pptxPython-Encapsulation.pptx
Python-Encapsulation.pptx
 
Abstract class
Abstract classAbstract class
Abstract class
 
Oop concepts in python
Oop concepts in pythonOop concepts in python
Oop concepts in python
 
Polymorphism in c++(ppt)
Polymorphism in c++(ppt)Polymorphism in c++(ppt)
Polymorphism in c++(ppt)
 
Inheritance ppt
Inheritance pptInheritance ppt
Inheritance ppt
 
Polymorphism in java
Polymorphism in javaPolymorphism in java
Polymorphism in java
 
Abstraction in java
Abstraction in javaAbstraction in java
Abstraction in java
 
This keyword in java
This keyword in javaThis keyword in java
This keyword in java
 
Java Collections
Java  Collections Java  Collections
Java Collections
 
Classes, objects in JAVA
Classes, objects in JAVAClasses, objects in JAVA
Classes, objects in JAVA
 

Destacado

4. python functions
4. python   functions4. python   functions
4. python functions
in4400
 
Nutrition presentation
Nutrition presentationNutrition presentation
Nutrition presentation
mirandajuza
 

Destacado (20)

javainterface
javainterfacejavainterface
javainterface
 
Matlab loops
Matlab loopsMatlab loops
Matlab loops
 
Abstract Class Presentation
Abstract Class PresentationAbstract Class Presentation
Abstract Class Presentation
 
Interface Vs Abstact
Interface Vs AbstactInterface Vs Abstact
Interface Vs Abstact
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
 
Adjacency And Incidence Matrix
Adjacency And Incidence MatrixAdjacency And Incidence Matrix
Adjacency And Incidence Matrix
 
Interface
InterfaceInterface
Interface
 
4. python functions
4. python   functions4. python   functions
4. python functions
 
Matlab Script - Loop Control
Matlab Script - Loop ControlMatlab Script - Loop Control
Matlab Script - Loop Control
 
MATLAB Programming - Loop Control Part 2
MATLAB Programming - Loop Control Part 2MATLAB Programming - Loop Control Part 2
MATLAB Programming - Loop Control Part 2
 
Java Programming - Abstract Class and Interface
Java Programming - Abstract Class and InterfaceJava Programming - Abstract Class and Interface
Java Programming - Abstract Class and Interface
 
Java OOP Programming language (Part 8) - Java Database JDBC
Java OOP Programming language (Part 8) - Java Database JDBCJava OOP Programming language (Part 8) - Java Database JDBC
Java OOP Programming language (Part 8) - Java Database JDBC
 
Android app development - Java Programming for Android
Android app development - Java Programming for AndroidAndroid app development - Java Programming for Android
Android app development - Java Programming for Android
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 
Core java complete notes - Contact at +91-814-614-5674
Core java complete notes - Contact at +91-814-614-5674Core java complete notes - Contact at +91-814-614-5674
Core java complete notes - Contact at +91-814-614-5674
 
Hypertension
HypertensionHypertension
Hypertension
 
Chapter 9 Abstract Class
Chapter 9 Abstract ClassChapter 9 Abstract Class
Chapter 9 Abstract Class
 
Nutrition presentation
Nutrition presentationNutrition presentation
Nutrition presentation
 

Similar a Abstract Class Presentation

06_OOVP.pptx object oriented and visual programming
06_OOVP.pptx object oriented and visual programming06_OOVP.pptx object oriented and visual programming
06_OOVP.pptx object oriented and visual programming
deffa5
 

Similar a Abstract Class Presentation (20)

When to use abstract class and methods in java
When to use abstract class and methods in java When to use abstract class and methods in java
When to use abstract class and methods in java
 
06_OOVP.pptx object oriented and visual programming
06_OOVP.pptx object oriented and visual programming06_OOVP.pptx object oriented and visual programming
06_OOVP.pptx object oriented and visual programming
 
OOPS ABAP.docx
OOPS ABAP.docxOOPS ABAP.docx
OOPS ABAP.docx
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
 
Abstraction in java [abstract classes and Interfaces
Abstraction in java [abstract classes and InterfacesAbstraction in java [abstract classes and Interfaces
Abstraction in java [abstract classes and Interfaces
 
Advanced Programming _Abstract Classes vs Interfaces (Java)
Advanced Programming _Abstract Classes vs Interfaces (Java)Advanced Programming _Abstract Classes vs Interfaces (Java)
Advanced Programming _Abstract Classes vs Interfaces (Java)
 
Oop
OopOop
Oop
 
Unit 3 Java
Unit 3 JavaUnit 3 Java
Unit 3 Java
 
PPT OF JAWA (1).pdf
PPT OF JAWA (1).pdfPPT OF JAWA (1).pdf
PPT OF JAWA (1).pdf
 
Java abstract Keyword.pdf
Java abstract Keyword.pdfJava abstract Keyword.pdf
Java abstract Keyword.pdf
 
Java OOPS Concept
Java OOPS ConceptJava OOPS Concept
Java OOPS Concept
 
Bt0074
Bt0074Bt0074
Bt0074
 
this keyword in Java.pdf
this keyword in Java.pdfthis keyword in Java.pdf
this keyword in Java.pdf
 
Top 20 basic java interview questions for SDET
Top 20 basic java interview questions for SDETTop 20 basic java interview questions for SDET
Top 20 basic java interview questions for SDET
 
Dev labs alliance top 20 basic java interview question for sdet
Dev labs alliance top 20 basic java interview question for sdetDev labs alliance top 20 basic java interview question for sdet
Dev labs alliance top 20 basic java interview question for sdet
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Dev labs alliance top 20 basic java interview questions for sdet
Dev labs alliance top 20 basic java interview questions for sdetDev labs alliance top 20 basic java interview questions for sdet
Dev labs alliance top 20 basic java interview questions for sdet
 
JAVA PPT -3 BY ADI.pdf
JAVA PPT -3 BY ADI.pdfJAVA PPT -3 BY ADI.pdf
JAVA PPT -3 BY ADI.pdf
 
Java 6.pptx
Java 6.pptxJava 6.pptx
Java 6.pptx
 
Object Oriented Programming - Polymorphism and Interfaces
Object Oriented Programming - Polymorphism and InterfacesObject Oriented Programming - Polymorphism and Interfaces
Object Oriented Programming - Polymorphism and Interfaces
 

Último

Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
David Celestin
 
Unlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven Curiosity
Unlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven CuriosityUnlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven Curiosity
Unlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven Curiosity
Hung Le
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
Kayode Fayemi
 
Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...
Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...
Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...
ZurliaSoop
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
amilabibi1
 

Último (17)

lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.
 
Digital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of DrupalDigital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of Drupal
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
 
Unlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven Curiosity
Unlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven CuriosityUnlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven Curiosity
Unlocking Exploration: Self-Motivated Agents Thrive on Memory-Driven Curiosity
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio III
 
Dreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video TreatmentDreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video Treatment
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Bailey
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
 
Zone Chairperson Role and Responsibilities New updated.pptx
Zone Chairperson Role and Responsibilities New updated.pptxZone Chairperson Role and Responsibilities New updated.pptx
Zone Chairperson Role and Responsibilities New updated.pptx
 
Introduction to Artificial intelligence.
Introduction to Artificial intelligence.Introduction to Artificial intelligence.
Introduction to Artificial intelligence.
 
Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...
Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...
Jual obat aborsi Jakarta 085657271886 Cytote pil telat bulan penggugur kandun...
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
 
in kuwait௹+918133066128....) @abortion pills for sale in Kuwait City
in kuwait௹+918133066128....) @abortion pills for sale in Kuwait Cityin kuwait௹+918133066128....) @abortion pills for sale in Kuwait City
in kuwait௹+918133066128....) @abortion pills for sale in Kuwait City
 
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdfSOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
 
ICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdfICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdf
 

Abstract Class Presentation

  • 1. Presentation Presented by: Ghazanfar Ali (FA15-BEE-012) Topic: Abstract Class and Concrete Class
  • 2. Contents:  Abstract Class Abstract Class Program  Concrete Class Concrete Class Program  Relation between Abstract Class and Concrete Class  Program output
  • 3. Abstract Class  Abstract class is just like other classes but it marks with abstract keyword.  Classes that contain one or more abstract methods  An abstract method is that which is declared but contains no implementation.  A method can be made abstract if we add the keyword “abstract” to it  Abstract classes may not be instantiated, and require subclasses to provide implementations for the abstract methods  These subclasses are also known as child class or derived class.  Now here is a simple program of an Abstract class
  • 5. Why we use abstract class?  The purpose of an abstract class is to provide a common definition of a base class that multiple derived classes can share.  For example; we were modeling the behavior of animals. Animals are capable of doing different things. Some common operations are performed by all animals, but in a different way as well as like the sounds they make.  And we can simply do this by overriding.
  • 6. Concrete Class  Default class in java  A derived class that provides the basic implementations for all of the methods that are not already implemented in the base class.  The concrete class is the implementation of an abstract class methods.  We can also call concrete methods of abstract class in concrete class objects.
  • 8. Why we use Concrete Class?  The implementation of an Abstract class.  In concrete class (child or derived class) you can call the methods of abstract class by overriding the methods of abstract class and then in main method we call the objects of concrete class which gives us the implementation of abstract class.
  • 11. Relation Between Abstract and Concrete Class  So Parent Class Child Class