22
WELCOME TO MY PRESENTION 1 Slide:1

Java presention Inheritance present By Showrov Ahamed

Embed Size (px)

Citation preview

Page 1: Java presention Inheritance present By Showrov Ahamed

WELCOME TO MY PRESENTION

Slide:1

Page 2: Java presention Inheritance present By Showrov Ahamed

SHOWROV AHAMED

161-35-140

Slide:2

Page 3: Java presention Inheritance present By Showrov Ahamed

Slide:3

Page 4: Java presention Inheritance present By Showrov Ahamed

ITS MY TOPIC

Slide:4

Page 5: Java presention Inheritance present By Showrov Ahamed

INHERITANCEIN JAVA

Slide:5

Page 6: Java presention Inheritance present By Showrov Ahamed

INHERITANCE

Slide:6

Page 7: Java presention Inheritance present By Showrov Ahamed

One of the most effective features of Oop’s paradigm. Establish a link/connectivity between 2 or more classes.

Permits sharing and accessing properties from one to another class.

to establish this relation Java uses ‘extends’ keyword

INHERITANCESlide:7

Page 8: Java presention Inheritance present By Showrov Ahamed

Category of Classes on the Basis of Inheritance

Super class (base/parent/driver/inheritance/ ancestor class).

Intermediate class (mediating/dual class). Child class (sub/associate/derived/inherited class).

Slide:8

Page 9: Java presention Inheritance present By Showrov Ahamed

Relation between classesSlide:9

Page 10: Java presention Inheritance present By Showrov Ahamed

SUPER CLASS

Top located class Service provider (its properties accessed by all its lower level class).

Slide:10

Page 11: Java presention Inheritance present By Showrov Ahamed

Intermediate class Middle located class

Having Dual policy (obtain properties of upper level class and transmit properties to lower level class).

Slide:11

Page 12: Java presention Inheritance present By Showrov Ahamed

Child Class

Bottom located class much benefitted class much loaded class properties of child class as well as

class and parent class can be accessed by

only the object of child class.

Slide:12

Page 13: Java presention Inheritance present By Showrov Ahamed

TYPES of INHERITANCE

• Single Inheritance

• Multilevel Inheritance

• Hierarchical Inheritance

Slide:13

Page 14: Java presention Inheritance present By Showrov Ahamed

TYPES of INHERITANCE

• Single Inheritance

• Multilevel Inheritance

• Hierarchical Inheritance

Slide:14

Page 15: Java presention Inheritance present By Showrov Ahamed

Single Inheritance

A structure having one and only one parent as well as child class.

Child class is authorized to access the property of Parent class.

Accesssing of class

Sharing of properties

Parent Class Child Class

Slide:16

Page 16: Java presention Inheritance present By Showrov Ahamed

Multilevel Inheritance

Standard structure of Single Inheritance having one Parent, one or more intermediate and one child classes.

Child class as well as intermediate class may access the properties of upper level classes.

Intermediate Class 216

Parent Class

Child Class Intermediate Class 1

Slide:16

Page 17: Java presention Inheritance present By Showrov Ahamed

Hierarchical InheritanceSyntax :

A structure having one parent and more child class. Child classes must be connected with only Parent class

Slide:17

Page 18: Java presention Inheritance present By Showrov Ahamed

Indirect Mechanism of Inheritance

Java Supports a special feature called interface. This feature helps to connect a class with more than one classes. For this type of connectivity java uses ‘implements’ keyword.

Syntax :interface A{ ……..}Interface B { ____}class M { -------}class N implements A,B extends M{ ===== _____------…………}

Slide:18

Page 19: Java presention Inheritance present By Showrov Ahamed

LIMITATIONSLink is establish into single direction(Fig). Java not support Multiple inheritance as well as Hybrid inheritance. The extends keyword permits to connect a class with only one class. In Interface, properties are only declared and assined, but n’ver defined.

Slide:20

Page 20: Java presention Inheritance present By Showrov Ahamed

Source:Google.comLinkdin.comGithub.comYoutube.com

Slide:21

Page 21: Java presention Inheritance present By Showrov Ahamed

THANK YOU

Slide:21

Page 22: Java presention Inheritance present By Showrov Ahamed

Slide:22