OOP - what is it? Fundamentals of Object Oriented Programming

Why is object-oriented programming preferred in most projects? OOP offers an effective way to combat their complexity. Instead of considering the program as a sequence of executable instructions, it presents it as a group of objects with certain properties and performs certain actions with them. This leads to clearer, more reliable and easy to maintain applications.

- () , . – , . , , .

C, Pascal, FORTRAN . - : , , , . . , ( ) . , .

, . , . . .





, .

, , : , .

– , .

oop this




, . . . . . , , .

. , , .

, ? -, . -, .

























, . , , . .

, , , C, . .

, . , , . .

. , .

. -, . -, . , .

, - , 5 , 12. short long. .

, , . , . , .

What is OOP in programming?




, . , . , . .

( ) , - . , . , ( ) ( ).

– , - . , "" "". , . . : , -, . , .

. , - C ++, . . . – -.

, , . . , .

, , , , -.

(- ) – C++ (-). Java , , , , C++. C# C++.

, - C++ -, Smalltalk. . .

OOP object oriented programming with plus




. , , . . : , , . . . , , . . , , . , , . . .

, . C++ , . , - C++ . , -.

object in oop this




:

- . - . .

? .

– :

  • ;
  • ;
  • ;
  • .

:

  • ;
  • ;
  • (, , );
  • , , , .

:

  • ;
  • ;
  • ;
  • .

:

  • ;
  • ;
  • ;
  • .

: . .

object in oop definition




– . ? . int, . . , C++. int.

. , , , int .

– . , . , , . – .

. , , , , . .

, , . . . . , .

, , . , . , . , , . , . - .

object in oop




, . , .

. , , . – . , .

. , (, ), :

position1 = position + origin,

position1, position origin – . , , .

basic principles of object oriented programming




,

= () + (), , , , int. position . , . , ? , . - Position.

Using operators or procedures depending on what they are working with is called polymorphism. When an existing operator, such as + or =, gets the opportunity to work with a new data type, they say that it is overloaded. Congestion in OOP is a type of polymorphism. She is his important feature.

The book on OOP "Object-oriented programming for dummies" will allow everyone to get acquainted with this topic in more detail.




All Articles