Home / Questions / Which of the Object Oriented programming principles explain the following illustrations? Justify.
Explanatory Question

Which of the Object Oriented programming principles explain the following illustrations? Justify.

👁 110 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

(a) The variables and methods are put together in a Class.

Encapsulation

(b) A man withdrawing money from ATM.

Abstraction

(a) Encapsulation is illustrated in the given picture. Wrapping of data and functions of an object as a unit (class) that can be used together in a specific operation is known as Encapsulation. In the picture, the variables and methods are being encapsulated in a class.

(b) The principle of Data abstraction is illustrated here as the man withdraws money from the ATM using the withdraw option. He knows the essential features of the ATM machine such as withdrawing money, without knowing the complex background details of how the ATM machine is operating to provide money to him.