In real life, a person can be many things at the same time. For example, an employee also can be a student and a mother or father. So we can say, he/she has 3 forms at the same time. In the dictionary, “Polymorphism” word means having the ability to have more than one form. We can say humans are polymorphic creatures when considered this point of view.
In Object-Oriented Programming, objects are also polymorphic. We create objects from classes and these objects act on behalf of their classes. So how can we gain many different forms? We remember inheriting other…
Let’s say we will build a building but there are a lot of phases before the start. One of them is creating a plan for the building. An architect creates a plan, draws a blueprint of the building in detail, and engineers start to build depending on that blueprint. Even the building is finished, that blueprint is useful for adding new features to that building or fixing any kind of damage later.
Developers actually do the same thing in coding. They plan first, then create some related objects and connect them. It is why we are also called engineers in…
Object-Oriented Programming started a new era in the coding world. After it was found, developers became capable of putting anything in the real world into the code world. Even we can fly some birds into our codes.
Let’s start with putting a parrot inside of our codes. We can simply create an object named Parrot and we can just create some methods on behalf of its actions and some variables on behalf of its attributes. We can declare a color variable in that object and decide its color and/or create a method named fly() and it is done. …
Before explaining what Encapsulation is, let’s look at its definition. Encapsulation means enclosing something in a capsule for keeping together whatever we put inside. A capsule does not let it's contents out so ingredients can stay together. For example, medicine is some mixture encapsulated inside a pill that we can use when we need it. With that pill, the ingredients of the medicine are the same as the first time it was mixed and the contents inside cannot be changed from the outside.
Let’s change some words there and try to look from the developers’ scope. If we put “Objects”…
Any person who has any experience with coding should have run into the “Arrays” term. But what are these Arrays we talking about? Why do we need them?
Arrays are basically Objects that hold a fixed number of values in a singular type. This means we can store numerical values like integers but we cannot store integer values with characters. But why do we need them? Actually, many companies have to store lots of information in their codes and do many manipulations on these.
In these times coding language creators or developers have to solve these problems and their response…
Passionate with coding, In love with learning, ambitious to implementing them to his life.