Open Close Principle with C#

Open Close Principle is an Object Oriented Design principle. It is first introduced by Betrand Meyer in 1988. He says “Software entities (Class, module, function etc.) should be open for extension, but closed for modification”. An entity is “Open for extension” means that its behavior can be extended to accommodate new demand. The entity is

Read More

Strategy Design Pattern with C#

Strategy design pattern is a behavioral design pattern. It is a particular software design pattern where algorithms are selected at runtime. According to the book of Design Pattern (Gang of Four) – “Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it.

Read More

Common OOP Interview Questions

What is object-oriented programming (OOP)?  What is class? Give a real life example.  What is an object? Give a real life example.  Explain the basic features of OOPs.  What is the relationship between a class and an object?  What is difference between OOP and procedural Language?  What is encapsulation? Why encapsulation is necessary, explain with

Read More

Procedural VS Object Oriented Programming

Object Oriented and Procedural are two programming paradigm. Procedural programming creates a step by step program that guides the application through a sequence of instructions. Procedural programming is also called linear programming. Generally, code is executed from the top of the file to the bottom in procedural programming. Object Oriented uses object to design applications

Read More