Sign up now
to enroll in courses, follow best educators, interact with the community and track your progress.
Download
Inheritance
79 plays

More
This lesson is about the Inheritance concept which is a part of OOp's topic.

Kshethra Annarapu
Hey everyone,I am Kshethra. I really love explaining to someone it somehow turned up to my passion.I'm really happy to fulfill my passion .

Unacademy user
Very helpful lecture mam
  1. INHERITANCE


  2. INHERITANCE This is the property by which the object of one class acquires the property of another class. The inheritance is acquired by using the keyword 'extends' e The different types of inheritance are Single Inheritance Multiple Inheritance Multilevel Inheritance Hierarchical Inheritance Hybrid Inheritance :


  3. Class A Class A Class A Class B Class A Class B Class C Class B Class BClassC Class C Single Inheritance Multilevel Inheritance Hierarchical Inheritance Multiple Inheritance Class A Class B Class C Class D


  4. INHERITANCE PROGRAM class Triangle double base-10; double height-1.5; void showdim() System.out.println(The base is"+base+"and height is"+height); class TriangleArea extends Triangle double area()


  5. System.out.println("The area of the triangle is"+(base height)/2); System.out.println("The area of the triangle is"+ (base*height)/2); class TriangleDemo public static void main(String args[]) TriangleArea obj=new TriangleArea ( ) ; obi.showDim obj.area); );