Multiple choice

If a class is a subset of another class, the relationship is called________relationship

  1. Has-A

  2. Is-A

  3. User-A

  4. none of these

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

When one class is a subset of another, it represents an 'Is-A' relationship through inheritance. The subclass inherits all properties and behaviors from the parent class while adding specialized features. This hierarchical relationship enables code reuse and polymorphism.