Saturday 25 April 2020

What is Encapsulation & Information Hiding in Software Engineering?

Encapsulation 


  •  Comines a piece of information with the specific behavior that act upon that information. The we package these into an object.
  •  – E.g Bank Account: Account Number, balance, customer name, address, account type, interest rate etc. with behaviur of open, close, deposit, withdraw, change account type etc. 
  • – Its like a one-stop shop for all changes related to account information and behavior – It limits the effect of change 

 Information Hiding 

  • – It’s the ability to hide murky details of an object from the outside world.
  •  – Provides the same benefits as Encapsulation

No comments:

Post a Comment