Multiple choice

Which of the following are essential features of an object-oriented programming language?

  1. Abstraction and encapsulation
  2. Strictly-typedness
  3. Type-safe property coupled with sub-type rule
  4. Polymorphism in the presence of inheritance

  1. 1 and 2 only

  2. 1 and 4 only

  3. 1, 2 and 4 only

  4. 1, 3 and 4 only

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

Object oriented programming languages necessarily have features like. Abstraction Encapsulation, inheritance with polymorphism but OOPL are also strongly-typed since there are restrictions on how operations involving values having different data types can be intermixed. Eg. two integers can be divided but one integer & one string can't.