Sunday, 30 August 2020

Object Oriented Programming

Object Oriented Programming, object-oriented programming is the basis of most programming languages ​​these days. object oriented programming concepts in java It is an advanced method of programming that is easy for programmers and for programming companies a lot of time and effort.

As it helped them to create programs and codes in an organized and non-repeated way, for some parts of the code in order to facilitate their easy return to the code or modification in a simple way.

Object-oriented programming uses some of its concepts.

object oriented design patterns:


It is the basis of this programming, where programming is divided into a group of units, each unit called an object. The program consists of a group of objects linked to each other with the program's external interface using the program structure and the interfaces used for each object.


It is the method of describing objects. It is the general form from which we copy the object, without class, there is no object.

3- Abstraction:

Abstraction: It is defining a programmatic description for a specific class. There are two types:

1-Data Abstraction: It is for defining the properties of an object.
2-Methods Abstraction: Defining object-specific verbs and defining processes and procedures.


Genetics: When an object inherits from another object, object oriented programming paradigm all properties and functions are automatically transferred from the first to the second without affecting the properties and actions of the first object.

The second object is the development of the first object by adding some properties without modifying the first.

It is also possible to inherit from one class to another, as it does the same job for this class, but by adding some Attributes and some methods in this new Class in addition to the inherited.

5- Polymorphism:

Polymorphism means using the function in more than one way. introduction to object oriented programming That is, one function call with the same writing method and the same name, with the type of object, changed.

class is called shape and it has one function called draw ().
And three objects inherit from the class, each object has the same function.
But each function draws a different shape according to the object.

6- Encapsulation:

Encapsulation: that is, hiding an object's data from the user in order to not allow him to suddenly change the object's internal data. That is, the programmer can control the quality of the internal data and functions of the object that are presented to the user and which can change them.

The most important thing for the user is how to use the program, not how it works.

The programmer creates a special user interface that allows the user to change only the specific data.

The packaging is to protect the code from tampering with functions outside the class.

object oriented design in software engineering:

1- Reducing the process of duplicating the code and saving time and effort.
2- The amendment is in one part only, instead of the amendment in more than one place, when the amendment is needed on a part in the code.
3- Regulating the code and collecting important data in specific parts, thus easy handling, especially with large applications.

define object oriented programming:

1- four pillars of oop It is difficult to change the properties of only one object without manipulating the properties of the class.
2- Difficulty separating data from each other.

No comments:

Post a comment

Reklama zdarma, zvýšení návštěvnosti

Contact Us


Email *

Message *