152k views
2 votes
The relationship between a parent class and a child class is referred to as a(n) relationship

Select one:
a. has-a
b. was-a
c. alias
d. instance-of
e. is-a

User Maksud
by
7.4k points

1 Answer

5 votes

Final answer:

The correct answer to the relationship between a parent class and a child class in object-oriented programming is known as an 'is-a' relationship. The correct answer is option e.

Step-by-step explanation:

The relationship between a parent class and a child class is referred to as an is-a relationship. In object-oriented programming, when a class is derived from another class, it inherits its properties and methods; thus, the child class is a type of the parent class.

This relationship can be thought of in the same way as biological relationships, where a child is a type of its parent's lineage. However, in programming, this is-a relationship allows the child class to acquire all functionalities of the parent class and possibly introduce its own specific features or override the inherited ones.

Using the options provided, the correct answer to the relationship between a parent class and a child class is option e. is-a.

User Petros
by
8.0k points