OOP Pillars (Polymorphism)

Primary tabs

Abdelraheem Al-najjar Raheem's picture

No Description Set

Bookmark to learn: Login to use bookmarks.

Bookmark to learn: Login to use bookmarks.

Add to collection ... add OOP Pillars (Polymorphism) 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 #

The ability of an object to take on many forms.

Polymorphism

What is the most common use of polymorphism in OOP?

When a parent class reference is used to refer to a child class object.

What Java object is considered to be polymorphic?

Any Java object that can pass more than one IS-A test

In Java, are all Java Objects polymorphic? If so, why?

Yes, since any object will pass the IS-A test for their own type and for the class Object.

If a class has multiple methods having same name but different in parameters

Method Overloading

What increases the readability of the program if we have to perform only one operation?

Having same name of the methods

What are the two ways to overload a method in Java?

- By changing number of arguments
- By changing the data type

If subclass (child class) has the same method as declared in the parent class, it is known as what?

Method Overriding

Method overriding is used for runtime - ?

Polymorphism

Method overriding is used to provide the specific implementation of a method which is already provided by its - ?

Superclass

Rules for Method Overriding:
The method must have the same name as in the - ?

Parent Class

Rules for Method Overriding:
The method must have the same - as in the parent class.

Parameter

Rules for Method Overriding:
There must be a - Relationship (Inheritance)

IS-A

Can a static method be overridden?

No, a static method cannot be overridden. It can be proved by runtime polymorphism