Thursday, October 29, 2020 16:35

Archive for the ‘Object Oriented Programming’ Category

Interfaces

Saturday, January 4th, 2020

Interfaces, just like C/C++ pointers, are one of those topics that beginners, and even intermediate programmers are afraid of, because they do not understand them. In fact, the truth is, they are simple to understand, and the real difficulty comes when asking the question “why should I use them/where should I use them?”.… Read more

Abstract classes and methods

Saturday, January 4th, 2020

As I was explaining in the previous lesson, one way of achieving abstraction is trough the means of abstract classes and methods. The abstract keyword can be used for both classes and methods. An abstract class is a class that provides a partial implementation.… Read more

Abstraction

Friday, January 3rd, 2020

Another fundamental principle of Object Oriented Programming is abstraction. Abstraction mainly refers to the ability of using something without knowing or being interested about how that something does what we request of it. We do this every day: we do not care how a computer does all it does (well, actually, some of us do), we only care that it is able to do what we need from it.… Read more

Polymorphism

Friday, January 3rd, 2020

The third fundamental principle of Object Oriented Programming is called polymorphism.  At a fundamental level, polymorphy refers to the ability of having many forms, or to transform into many forms. It comes from the Greek terms poly, which means “multiple”, and morph, which means “shape” or “form”.… Read more

Encapsulation

Thursday, December 19th, 2019

The second fundamental principle of Object Oriented Programming is called encapsulation.  Its main definition refers to the action of hiding anything that is not essential from the outside world. It is not very difficult to understand the fact that we do not need to expose everything when we build something.… Read more

Virtual Methods

Sunday, December 8th, 2019

Virtual methods are methods that can be overridden in inheriting (derived) classes. By default, in .NET, methods are not virtual. In order to declare a method as virtual, we need to declare it using the keyword virtual, like so:

Read more

Inheritance

Sunday, November 17th, 2019

In the first lesson of the Objects chapter, I was discussing in a broad way about Object Oriented Programming, acronymed OOP, and I was enumerating it’s fundamental principles: encapsulation, inheritance, abstraction and polymorphism. In this lesson, I will explain inheritance at large, and how class hierarchies improve code readability and reusability.… Read more


Do NOT follow this link or you will be banned from the site!