Simple Way To Understand Encapsulation And Abstraction

An example using C# //abstraction – exposing only the relevant behavior public interface IMakeFire { void LightFire(); } //encapsulation – hiding things that the rest of the world doesn’t need to see public class Caveman: IMakeFire { //exposed information public string Name {get;set;} // exposed but unchangeable information public byte Age {get; private set;} //internal… Continue reading Simple Way To Understand Encapsulation And Abstraction