230328 What is the OOP?

William Parker·2023년 3월 28일
0

What is Object Oriented Programming?

Object-Oriented Programming (OOP) is a programming method that abstracts the data necessary for programming, makes it into objects with states and behaviors, and configures logic through interactions between objects.

What is an Object?
An object refers to a space referred to by data or identifiers used in a program, and an object is created by tying variables to store values ​​and methods to perform tasks to each other.

Object-oriented programming can be compared to Lego. Objects will be pieces of Lego, and object-oriented programming is a way of assembling Lego pieces to create something.

Objects can also be reused in many places, similar to Lego pieces, which shows the characteristics of object-oriented programming such as componentization and reusability.

Characteristics of object-oriented programming
Object-oriented programming has four main characteristics: abstraction, encapsulation, inheritance, and polymorphism.

  1. Abstraction
    Abstraction is the process of simplifying a program by hiding unnecessary information and presenting only important information.

  2. Encapsulation
    Combining data structures and methods of handling data together (meaning grouping variables and functions together)
    Designing to maintain low coupling

  3. Inheritance
    Passing on properties and behavior of a class to subclasses, or subclasses inheriting properties and behaviors of superclasses
    Ability to allow new classes to use the data and operations of existing classes

  4. Polymorphism
    One variable name or function name that can be interpreted differently depending on the situation
    Putting multiple concepts into an element

Advantages and disadvantages of object-oriented programming

Advantages
Because it is modularized and developed in class units, task division is convenient and suitable for large-scale software development.
Maintenance is convenient because it can be modified in class units.
Code reuse is easy by reusing classes or extending them through inheritance.
disadvantage
Processing speed is relatively slow.
As the number of objects increases, the capacity may increase.
Designing can take a lot of time and effort.

profile
Developer who does not give up and keeps on going.

0개의 댓글