Ask Question

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

+4
Answers (1)
  1. 24 July, 19:17
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers