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.
You might also like to view...
A rule of thumb to use for adequate trainee viewing, whether static or dynamic visuals are used, is
a. three feet of trainee distance from the screen for every inch of screen size. b. one foot of trainee distance from the trainer for every foot of screen size. c. two feet of trainee distance from the screen for every foot of screen size. d. one foot of trainee distance from the screen for every inch of screen size. e. two feet of trainee distance from the screen for every 3 inches of screen size.
The placement of pronouns, adverbs, phrases, and clauses in a sentence is not critical to the meaning of the sentence
Indicate whether the statement is true or false
Any agreement among competitors to fix prices constitutes a per se violation of antitrust law.
Answer the following statement true (T) or false (F)
A foreign exchange ________ is the price of one currency expressed in terms of another currency. A foreign exchange ________ is a willingness to buy or sell at the announced rate
A) quote; rate B) quote; quote C) rate; quote D) rate; rate