Which of the following are essential features of an object-oriented programming language?
- Abstraction and encapsulation
- Strictly-typedness
- Type-safe property coupled with sub-type rule
- Polymorphism in the presence of inheritance
-
1 and 2 only
-
1 and 4 only
-
1, 2 and 4 only
-
1, 3 and 4 only
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.