In object-oriented technology, the part that defines superclass–subclass relationships is inheritance.

Quick Scoop: Core Answer

  • A superclass is the more general, parent class from which other classes derive.
  • A subclass is a more specialized class that extends the superclass and reuses or overrides its behavior.
  • The mechanism that defines and connects these two (who is parent, who is child) is inheritance.

So, if your exam or quiz asks:

“What part of object-oriented technology defines superclass and subclass relationships?”

The correct one-word answer is:

Inheritance

Tiny Illustration

Imagine a class Animal and a class Dog:

  • Animal is the superclass (general: can eat, sleep).
  • Dog is the subclass (more specific: can bark, fetch).
  • The fact that Dog “is an” Animal and automatically gets eat() and sleep() is exactly what inheritance defines.

Mini Table: Concept Snapshot

[1][9][3] [9][3][5] [6][8][3][5]
Concept Role Example
Superclass General parent class.Animal, Vehicle
Subclass Specialized child class that extends the superclass.Dog extends Animal
Inheritance OOP feature that defines the superclass–subclass relationship.class Dog extends Animal

Information gathered from public forums or data available on the internet and portrayed here.