Python Tutorial 42 --- "Abstraction & Encapsulation (OOPS 7)"
Python Tutorial 42 --- "Abstraction & Encapsulation (OOPS 7)" Our today's tutorial is based mainly on theory because coding is not just about learning new concepts but also about understanding them. Let us give our PyCharm some rest and try to learn some theory about Abstraction and Encapsulation, which are very important concepts for our tutorials ahead. What is Abstraction? Abstraction refers to hiding the unnecessary details so that the focus could be on the whole product instead of parts of the project separately. It is a mechanism that represents the important features without including implementation details . Abstraction helps us in partitioning the program into many independent concepts so, we may hide the irrelevant details in the code. It offers the greatest flexibility when using abstract data type objects in different situations. Example of Abstraction Let us take the example of a car. It has an engine, tires, windows, steering wheel, etc. A...