Basic Object Oriented Programming Tutorial: Introduction

Post a Comment

 

OOP

What is Object Oriented Programming(OOP)?

Object oriented programming, referred to simply as oop, is a paradigm or model in system development rules that takes the form of an object. Simply put, oop aims to make it easier for programmers to create software rather than redesigning it with excessive logic to manipulate data. OOP has the following core structure model:

Class

If you imagine a class as a building in a school with many students, you are not entirely incorrect; however, using simple logic, the class can be said to be a collection of several individuals based on their nature or behavior. For example, in a cooking class, we can conclude that they have uniform characteristics such as wearing a chef's hat, then using a spatula, and so on, as well as behaviors such as cutting, frying, and so on.

well the same thing applies to classes in OOP. A class in the world of software development or software development can be said to be a group of objects that contains a data type, attributes and methods to form a blueprint of a class, more or less like the example of the cooking class earlier. , we can say that cooking class is a blueprint.

Attributes

Attributes can simply be said to be properties attached to a class or represent the state of the class, okay, let's go back to the example of a cooking class in a cooking class, we definitely need a stove to cook or we need a human to operate it, gas stoves and humans. here it can be said as an attribute because it is attached to cooking activities.

Object

The object can be defined as a group formed from a recognizable class blueprint. As an example, consider a cooking class. We know that some cooking classes, such as fried noodle cooking classes, have specific types, so we can more easily recognize and group the classes based on their contents.

Method

Methods in OOP are closely related to a class, methods can be said to be behaviors that the class can do, okay, let's go back to the cooking class example, in a cooking class we can do what is called frying, boiling and others.

OOP Advantage

Using the OOP paradigm has the following advantages:

  • The modularity and neatness of our code can be maintained by other developers and is in accordance with existing standards so that logic does not collide with one another.
  • Reusability of the code that we write so that it does not need to be written over and over again.
  • Easy Maintenance The code that we create is easier for us to maintain and easy to upgrade.

Types of Object Oriented Programming

In the concept of OOP has 4 pillars as follows:

  • Abstraction
  • encapsulation
  • Inheritance
  • Polymorphism

I will explain the type of OOP in greater detail in the following material, and I will explain abstraction in the first material. That's all there is to it this time. Thank you very much.

Related Posts

Post a Comment

Subscribe Our Newsletter