September 15, 2016

Object Oriented Concept

An "object" in an OOP language refers to a specific type or "instance" of a class

Class is blueprint or template which use for creating an object

Class - Encapsulate the objects Method, Property and Access specifier help for abstraction

Abstraction: we don't need to care about how it works internally

Acess specifier
Public: Available to the container class, entire assembly and to outside
Protected internal: Available to the derived class and entire assembly as well
Internal: Available in entire assembly across the classes
Protected: Available in the container class and the derived class
Private: Available only to the container Class

Modifiers such as static are not considered as part of the method signature.


Inheritance: reuse code: child class doesn't have to redeclare and redefine all the members which it inherits from the parent class. You could override all of the unwanted methods

Polymorphism: It means many forms. The concept refers to the many possible forms of behaviors of an object






No comments: