I faced this question in an interview. I came back and read up about it here on SO and came across this, this and this, and many other duplicates saying almost the same thing.
I understand that the general definitions predate their implementations in programming languages. I also know that programming languages (I speak for Java) try to separate the two definitions as much as possible. For ex: Java considers class
as encapsulation, as provides a wrapper to hold all your similar data; and interface
is a kind of abstraction.
But what I really want to know is how do the two definitions overlap? Are the two subsets, overlapping, or completely disjoint sets.
I understand that the definitions change wrt to generic definitions and language specific definitions, so answer both if you can, or atleast mention the one you're talking about.