Published Nov 8, 2022
3 mins read
595 words
This blog has been marked as read.
Read more
Technology
Academics and Education
Others

Object Oriented Programming Language Explained

Published Nov 8, 2022
3 mins read
595 words

There are many definitions in different sources. Some of them like:
Object Oriented Programming is a programming method based on a hierarchy of classes and clearly defined and cooperative objects (Oracle, 2010a)

Object Oriented Programming (OOP) is different from procedural programming languages. in a number of ways. Everything in OOP is grouped together as objects. OOP, defined in its purest sense, is implemented by sending messages to objects (IBM, 1995a)

Object-oriented programming (OOP) is an organized programming language paradigm organized around “objects” rather than “actions” and data rather than logic (TechTarget, 2008)

In other words, OOP is a style of programming in which the programmer must specify more than just the data type of the user. data structures, but also the functions or operations that apply to the data structures. That way the data structure is converted into an object that includes both data and functions. Java, Python, Visual Basic .NET, Ruby, Smalltalk, and C++ are some of the popular OOP languages. OOP begins with the first step of defining all the objects to be manipulated and how they define each other. This is often referred to as data modeling. Once the object has been defined, we need to label it as an object class and also define the data type it contains and the logical strings that can be manipulated with it. A separate chain of logic is called a method. A class instance is called as an object. The object runs in the machine (computer). Computer instructions are provided by methods and data is provided by object properties.

Principles of OOP
OOP deals with objects, and to define it, it is necessary to know the types of objects described in the class. Objects are instances of the class. A class contains methods and properties.

Attribute - used to represent an object using dots, such as:
anObject.someAttribute; properties can be of any type, even identical to an object type.

Methods - used to represent the operation of an object such as:
anObject.someMethod (parameter);

The difference between property and method is that a property can only contain a value or a state, but a method can also operate.

In the programming world, there is no single definition of OOP that can be accepted by everyone at the same time but some principles have been formed to help understand OOP (Filimon, 2007a):


Modularity - this means breaking the program code into different parts that can then be easily linked together to create a well-organized program.

Figure 1:
Modules (Filimon, 2007b)

Packaging - it is related to modules. According to this, everything but the object's interface must be hidden and positioned correctly, so that the actual implementation can be easily changed, with improved program security (Filimon 2007a) ).

Figure 2: Encapsulation
(IBM, 1995b)

Inheritance - this is the main reason why OOP works so well. It allows a class to have the same behavior as another and extends or removes that behavior to provide special action for specific needs (IBM, 1995a)

Figure 3:
Inheritance (Oracle, 1995a). 2010b)

because it derives from java .lang.Object for user interface classes.

Advantages of OOP
With the help of inheritance, a programmer can eliminate redundant code and extend the use of existing code.

Class

Programs can be built from modules that work together, rather than starting code from scratch. As a result, development time is saved and productivity is higher.

Due to data hiding, programs are designed to be unaffected by codes in other parts of the program, which provides greater system security and prevents unintentional corruption. idea.

Multiple instances of an object can coexist without any interference.

34

Candlemonk | Earn By Blogging | The Bloggers Social Network | Gamified Blogging Platform

Candlemonk is a reward-driven, gamified writing and blogging platform. Blog your ideas, thoughts, knowledge and stories. Candlemonk takes your words to a bigger audience around the globe, builds a follower base for you and aids in getting the recognition and appreciation you deserve. Monetize your words and earn from your passion to write.