OOP - Sample Interview Question (Junior Level)

What object oriented concept best describes the following example:

There is a Chicken class, a Cat class, a Lion class, and a Horse class, and they all have a eat() method (that does the same). To improve the design, we have created another class called Animal and placed the eat() method there. We made all the other classes inherit from Animal.
  1. Abstraction
  2. Encapsulation
  3. Encapsulation
  4. Information Hiding
Tests in OOP for Juniors

Test Name Difficulty Time (minutes) No. of Questions
OOP Online Test for Juniors OOP Junior 20 10