Ask Question
28 December, 19:10

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

+5
Answers (1)
  1. 28 December, 21:16
    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?
Find an answer to your question ✅ “Given the following declarations, public class Parent { ... } public class Child extends Parent implements Wizard { ... } public class ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers