OOP in C# part 02
Encapsulation combining data,functions into a single unit called class and hiding internal details of object. Generally, Data hides for security such as making the variables as private.Encapsulation is implemented by using access specifiers. C# supports the following access specifiers: Real world example: TV Remote Abstraction Process of hiding the details of implementation and display the essential feature (describe object, by define their unique & relevant characteristic) Real world example: TV Encapsulation vs Abstraction Encapsulation Abstraction Solves the problem at Implementation level Design level Hide Code and data in class to protect Unwanted data and provide relevant data Inheritance A Class that derive from another class known as base class. This promote reuse and maintainability Public class parent{ //create constructor Public parent(){ Console.WriteLine( "Constructor." ); } public void display() { ...