Multiple choice

Which of the following should be used to implement a 'Like a' or a 'Kind of' relationship between two entities?

  1. Polymorphism

  2. Templates

  3. Inheritance

  4. Containership

  5. Encapsulation

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

When a class derives it functionality (methods and properties) from another class, it is known as inheritance. The derived class can access all the non-private data and behaviour of the base class.