java presention inheritance present by showrov ahamed

Post on 21-Apr-2017

125 Views

Category:

Engineering

5 Downloads

Preview:

Click to see full reader

TRANSCRIPT

WELCOME TO MY PRESENTION

Slide:1

SHOWROV AHAMED

161-35-140

Slide:2

Slide:3

ITS MY TOPIC

Slide:4

INHERITANCEIN JAVA

Slide:5

INHERITANCE

Slide:6

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

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

Relation between classesSlide:9

SUPER CLASS

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

Slide:10

Intermediate class Middle located class

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

Slide:11

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

TYPES of INHERITANCE

• Single Inheritance

• Multilevel Inheritance

• Hierarchical Inheritance

Slide:13

TYPES of INHERITANCE

• Single Inheritance

• Multilevel Inheritance

• Hierarchical Inheritance

Slide:14

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

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

Hierarchical InheritanceSyntax :

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

Slide:17

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

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

Source:Google.comLinkdin.comGithub.comYoutube.com

Slide:21

THANK YOU

Slide:21

Slide:22

top related