
  How will encapsulation help when making changes in code and from its rippling effects.


Let me give you a typical and simplistic example. 
First, suppose you are not using encapsulation:
You have a set of data and use an array to store that data, and there is another part of your program that uses that array. Now, if at some point you decide that a linked list is a better choice for storing your data. If you replace array with linked list, what is going to happen? Your program will break, unless you make changes all over the place to replace the array-processing logic with linked-list-processing logic.

But, if you use OO/Encapsulation, then you probably partition your program into classes, one that store the data, and other, that uses the data. In the first class, you hide your implementation (encapsulation), and expose your services through methods like

size()
remove(int index)
add(int index, Object o)
get(int index)

...


In this second case, if you change the implementation of the storing class from array to linked list, or to any other thing, it will not affect your clients. No ripple effect.

How is encapsulation used for safety?
Today I saw a post on Facebook that had this pun:


  Clicked links turn purple because blue + "read" equals purple


Is there any specific reason why a link is blue and when it is clicked/read, it turns to purple?

Do these colors have any meaning?
