Computer Science, asked by gkmand5112, 1 year ago

How does inheritance relate to abstraction? 1. A base class is an abstraction of all its derived classes. 2. A derived class is an abstraction of all its base classes. 3. Base and derived classes are abstractions for each other. 4. Inheritance prevents abstraction

Answers

Answered by AndreTheKing
7

Answer:

1

Explanation:

When we use the derived classes, they does not show the background details of the base class.

Answered by mariospartan
12

Answer:

Inheritance relates to abstraction by the "derived class is an abstraction of all its base classes".

Option 2

Explanation:

A "base class is the class" from which another class originated in a "object-oriented" programming language. So, the "derived class" uses of all  raw material like code from base class to execute programs except a deconstruction and constructor.

Whereas derived class is the class that extracts data from the "base class and acquire" the basic property of base class as well. Therefore, a derived "class is a abstraction" of all it's base class.

Similar questions