Multiple choice

When a class is based on another class, it inherits:

  1. The data and methods for the class

  2. The methods and messages for the class

  3. Only the data for the class

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Inheritance allows a subclass to acquire the properties (data) and behaviors (methods) of a parent class. This promotes code reuse and hierarchical organization.