QUESTION IMAGE
Question
which occurs when a new class uses an existing class, its properties, and methods?
encapsulation
polymorphism
inheritance
operation overloading
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.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
C. inheritance