Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
9 views1 page

Inheritance

JALA Academy is the first institution providing 100% job guarantee programs for individuals with varying experience levels in IT. The academy offers training in various fields such as Full Stack, MERN Stack, QA, Test Automation, and more, along with internship opportunities. Additionally, the document includes a programming exercise related to class inheritance and runtime polymorphism.

Uploaded by

Amit Tiwari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

Inheritance

JALA Academy is the first institution providing 100% job guarantee programs for individuals with varying experience levels in IT. The academy offers training in various fields such as Full Stack, MERN Stack, QA, Test Automation, and more, along with internship opportunities. Additionally, the document includes a programming exercise related to class inheritance and runtime polymorphism.

Uploaded by

Amit Tiwari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

JALA Academy is the world’s first Academy offering 100% Job guarantee Programs

without Trainers from 0 to 20 years’ experience.


Anyone who wants to build solid career in IT can enroll.
Read JALA Academy website and contact us for any career advice and questions.

7. Inheritance

A, B and C are classes

A is a super class. B is a sub class of A. C is a sub class of B.

Create three methods in each class, 2 methods are specific to each class and third
method (override method) should be in all three Classes A, B and C

Create a class with main method. Create an object for each class A, B and C in main
method and call every method of each class using its own object/instance.

Call an overridden method with super class reference to B and C class’s objects

Runtime Polymorphism with Data Members/Instance variables, Repeat the above


process only for data members

_____________________________________________________________________________________
JALA Academy offers Job Guarantee Programs, Income Earning Opportunities, and Internship with
stipend on Full Stack, MERN Stack, QA, Test Automation, RPA, Cloud Technologies, DevOps and Cyber
Security. Read our website JALA Academy for more details.

You might also like