Abstraction in object-oriented programming means hiding complex internals but to expose only essential characteristics and behavior with respect to context. In real life, an example of abstraction is an online shopping cart, say at any e-commerce site. Once you select a product and book order, you are just interested in receiving your product on time.
How things happen is not what you are interested in, as it is complex and kept hidden. This is known as abstraction. Similarly, take the example of ATM, the complexity of internals of how money is debited from your account is kept hidden, and you receive cash via a network. Similarly for cars, how petrol makes the engine run the automobile is extremely complex.
Posted Date:- 2021-09-29 23:32:06