khameed
Quiz von , erstellt am more than 1 year ago

This Quiz aims to test the basic objective of inheritance

48
0
0
khameed
Erstellt von khameed vor etwa 9 Jahre
Schließen

Overriding

Frage 1 von 5

1

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

Wähle eine der folgenden:

  • Libraries

  • Inheritance

  • polymorphism

  • abstraction

Erklärung

Frage 2 von 5

1

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

Wähle eine der folgenden:

  • public

  • Student

  • Person

  • extends

Erklärung

Frage 3 von 5

1

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

Wähle eine oder mehr der folgenden:

  • 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

Erklärung

Frage 4 von 5

1

Inheritance enhances the ability to reuse existing code.

Wähle eins der folgenden:

  • WAHR
  • FALSCH

Erklärung

Frage 5 von 5

1

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

Wähle eins der folgenden:

  • WAHR
  • FALSCH

Erklärung