Give example of stack using encapsulation of OOA
An example of the Stack.
A Stack abstraction provides methods like pop (), push (), isEmpty(), isFull(). The Stack can be implemented as a single linked list, or a double linked list, or a binary search tree, or an array. This property is called encapsulation. It hides all the details of the implementation of an object.