183k views
4 votes
15

Select the correct answer.
Consider two classes: book and novel. We derive the class novel from the class book. What is the type of relationship between the objects of these classes?
A. 
extension
B. 
abstraction
C. 
hiding
D. 
inheritance
E. 
binding

2 Answers

4 votes

I believe that the answer is A: Extension but I am not 100% sure, hope this helps.

User Sravan
by
5.1k points
3 votes

Answer:

d. Inheritance.

Step-by-step explanation:

The two classes are book and novel.

Since the class novel is derived from the class book, then the relationship between them (these objects) is inheritance. Inheritance is "is-a" relationship.

In this case, a novel "is a" book.

Inheritance is one of the principles of object oriented programming (OOP) in which a class, called the sub class or child class, derives, extends or inherits features of another class, called the super class or parent class or base class. In other words, in inheritance, a sub class is derived from another class in such a way that these classes have an "is-a" relationship.

In this case, the novel is the sub or child class while the book is the super, base or parent class.

User ZNK
by
4.7k points