Difference between revisions of "object-oriented programming"

From Lazarus wiki
Jump to navigationJump to search
(Created page with "{{object-oriented programming}} An object-oriented programming (OOP) is a programming method to write programs using "object" to represent data and methods. The ob...")
 
 
Line 1: Line 1:
 
{{object-oriented programming}}
 
{{object-oriented programming}}
  
An object-oriented programming (OOP) is a programming method to write programs using "object" to represent data and [[Method|methods]]. The object can, upon request, perform the functions that are known as methods. The object stores data in its internal [[Variable|variables]]. The [[Class|<syntaxhighlight lang="pascal" enclose="none"> class</syntaxhighlight>]] defines the common features of certain objects.
+
An object-oriented programming (OOP) is a programming method to write programs using "object" to represent data and [[Method|methods]]. The object can, upon request, perform the functions that are known as methods. The object stores data in its internal [[Variable|variables]]. The [[Class|<syntaxhighlight lang="pascal" inline> class</syntaxhighlight>]] defines the common features of certain objects.
  
 
The inheritance allows you to make new class definitions based on old definitions
 
The inheritance allows you to make new class definitions based on old definitions
(see more about using the [[Reserved word|reserved word]] [[Inherited|<syntaxhighlight lang="pascal" enclose="none">inherited</syntaxhighlight>]]).
+
(see more about using the [[Reserved word|reserved word]] [[Inherited|<syntaxhighlight lang="pascal" inline>inherited</syntaxhighlight>]]).
A [[Constructor|<syntaxhighlight lang="pascal" enclose="none">constructor</syntaxhighlight>]] is a method called object creation.
+
A [[Constructor|<syntaxhighlight lang="pascal" inline>constructor</syntaxhighlight>]] is a method called object creation.
A [[Destructor|<syntaxhighlight lang="pascal" enclose="none">destructor</syntaxhighlight>]] is called when the object is destroyed.
+
A [[Destructor|<syntaxhighlight lang="pascal" inline>destructor</syntaxhighlight>]] is called when the object is destroyed.

Latest revision as of 17:26, 6 August 2022

English (en) Esperanto (eo) suomi (fi) polski (pl)

An object-oriented programming (OOP) is a programming method to write programs using "object" to represent data and methods. The object can, upon request, perform the functions that are known as methods. The object stores data in its internal variables. The class defines the common features of certain objects.

The inheritance allows you to make new class definitions based on old definitions (see more about using the reserved word inherited). A constructor is a method called object creation. A destructor is called when the object is destroyed.