Overriding

Question 1 of 5

Medal-premium 1

One of the main concepts in OOP is _____________ That allows to use the features ( methods )of one class in another?

Select one of the following:

  • Libraries

  • Inheritance

  • polymorphism

  • abstraction

Question 2 of 5

Medal-premium 1

Identify the child class in the java statement. public class Student extends Person{

Select one of the following:

  • public

  • Student

  • Person

  • extends

Question 3 of 5

Medal-premium 1

In Method Overriding the following the following conditions hold. Select more than one that apply

Select one or more of the following:

  • Child class method must have same name as in the parent class.

  • Child class method must have same parameter as in the parent class.

  • Child class method must have same return type as in the parent class

  • Child class method must have different name as in the parent class.

  • Child class method must have different return type as in the parent class

  • Child class can have different method signature

Question 4 of 5

Medal-premium 1

Inheritance enhances the ability to reuse existing code.

Select one of the following:

  • True
  • False

Question 5 of 5

Medal-premium 1

An object of a sub class can not be referenced by a variable of a super class type

Select one of the following:

  • True
  • False
Icon_fullscreen

Overriding

khameed
Quiz by , created over 1 year ago

This Quiz aims to test the basic objective of inheritance

Eye 45
Pin 0
Balloon-left 0
khameed
Created by khameed over 1 year ago
Close