Information hiding

Information hiding is a conceptual process by which programmers conceal implementation details into functions.
Functions can be seen as black boxes.
Black boxes are simply components, logical or physical that perform tasks.
You may not know how the black box performs (implements) tasks; you just simply know it works when needed.
Each black box describes one component;
in this case the components are printf() and scanf(). The reason that I consider the two
functions printf() and scanf() black boxes is because you do not need to know what’s inside
of them (how they are made), you only need to know what they take as input and what they
return as output. In other words, understanding how to use a function while not knowing
how it is built is a good example of information hiding.

In structured programming you build components that can be reused (code reusability) and
that include an interface that other programmers will know how to use without needing to
understand how they were built (information hiding).

No Response to "Information hiding"

Post a Comment

 

Copyright © 2013-2014 Lai Duy Thanh All rights reserved.