Ask Question
26 June, 12:16

Given the following declarations,

public class Parent { ... }

public class Child extends Parent implements Wizard { ... }

public class Grandchild extends Child { ... }

Which of the following is NOT true?

a. Child "Is-A" Wizard

b. Parent "Is-A" Wizard

c. Grandchild "Is-A" Child

d. Grandchild "Is-A" Parent

e. Grandchild "Is-A" Wizard

+3
Answers (1)
  1. 26 June, 15:36
    0
    Option b is a correct answer for the above question.

    Explanation:

    IS-A relationship occurs for a child class when the child class inherits the parent class, then it has been said that "child class "Is-A" Parent class". This can be followed by the interface and class both.

    The above question asked that which is not true for the "Is-A" concept. Option b is not true, because it states that the Parent class inherits the Wizard interface, but the question code is not stated like this. Hence option b is correct while the other is not because:-

    Option a state's child inherits the wizard which is true. Option c states Grandchild inherits the Child which is true. Option d states Grandchild inherit the Parent which is true. Option e states Grandchild inherit the wizard which is true.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Given the following declarations, public class Parent { ... } public class Child extends Parent implements Wizard { ... } public class ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers