Explain the role of interface in encapsulation. Explain by providing examples

What will be an ideal response?

Encapsulation creates a black box that hides how the object works inside. What is inside the box is private; what the objects offer to outside entities are called its services. The collection of an object's services is called its interface. The brake pedal in a car is the interface that provides services (stops the car) while the mechanism that actually stops the car is encapsulated and hidden (the driver does not have to know the intricacy of it to be able to use the brake). Students may provide other examples such as keyboard for a computer as you type, you see the results on the screen without knowing what is happening in the black box inside the computer.

Business

You might also like to view...

Which step in the five-step marketing research process has been left out of the following list: defining the problem, conducting the research, analyzing the research, and addressing the problem in a research paper?

A) developing the research budget B) choosing the research agency C) choosing the research method D) designing the research E) comparing and contrasting primary and secondary data

Business

If the objective function is parallel to a constraint, the linear program could have ________

Fill in the blank with correct word.

Business