Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

which occurs when a new class uses an existing class, its properties, a…

Question

which occurs when a new class uses an existing class, its properties, and methods?
encapsulation
polymorphism
inheritance
operation overloading

Explanation:

Brief Explanations

In object - oriented programming, inheritance is the mechanism by which a new class (sub - class) can use the properties and methods of an existing class (super - class). Encapsulation is about hiding data and methods within a class. Polymorphism allows objects of different classes to be treated as objects of a common super - class. Operation overloading is about giving operators different meanings for different data types.

Answer:

C. inheritance