OOP Pillars (Inheritance)

Primary tabs

Abdelraheem Al-najjar Raheem's picture

No Description Set

Subjects: 

Bookmark to learn: Login to use bookmarks.

Bookmark to learn: Login to use bookmarks.

Add to collection ... add OOP Pillars (Inheritance) to your collections:

Help using Flashcards ...just like in real life ;)

  1. Look at the card, do you know this one? Click to flip the card and check yourself.
  2. Mark card Right or Wrong, this card will be removed from the deck and your score kept.
  3. At any point you can Shuffle, Reveal cards and more via Deck controls.
  4. Continue to reveal the wrong cards until you have correctly answered the entire deck. Good job!
  5. Via the Actions button you can Shuffle, Unshuffle, Flip all Cards, Reset score, etc.
  6. Come back soon, we'll keep your score.
    “Repetition is the mother of all learning.”
  7. Signed in users can Create, Edit, Import, Export decks and more!.

Bookmark to learn: Login to use bookmarks.

Share via these services ...

Email this deck:

Right: #
Wrong: #
# Right & # Wrong of #

A mechanism in which one object acquires all the properties and behaviors of a parent object.

Inheritance

When you inherit from an existing class, you can reuse 'X' and 'Y' of the parent class. Moreover, you can add new 'X' and 'Y' in your current class also.

Methods and Fields

Inheritance represents the - relationship which is also known as a parent-child relationship.

IS-A

What are the two advantages of inheritance?

Method Overriding & code reusability

A - is a group of objects which have common properties. It is a template or blueprint from which objects are created.

Class

A class which inherits the other class. It is also called a derived class, extended class, or child class.

Sub Class/Child Class

The class from where a subclass inherits the features. It is also called a base class or a parent class.

Superclass

A mechanism which facilitates you to reuse the fields and methods of the existing class when you create a new class.

Reusability

The - keyword indicates that you are making a new class that derives from an existing class. The meaning of - is to increase the functionality.

Extends

What are the three types of inheritance in Java?

Single, Multilevel, and hierarchical

Which two types of inheritance is supported through interface only?

Multiple and hybrid

Identify the inheritance in the image below:

Hierarchical

Front image: 

Identify the inheritance in the image below:

Multiple

Front image: 

Identify the inheritance in the image below:

Multilevel

Front image: 

Identify the inheritance in the image below:

Single

Front image: 

Identify the inheritance in the image below:

Hybrid

Front image: 

Why is multiple inheritance not supported in Java?

To reduce the complexity and simplify the language

Subjects: