Object-oriented programming: Difference between revisions

Content deleted Content added
mNo edit summary
No edit summary
Tags: Reverted Visual edit
Line 5:
 
'''Object-oriented programming''' ('''OOP''') is a [[programming paradigm]] based on the concept of "[[Object (computer science)|objects]]", which can contain [[data]] and [[Computer program|code]]. The data is in the form of [[Field (computer science)|fields]] (often known as [[Attribute (computing)|attributes]] or ''properties''), and the code is in the form of procedures (often known as ''[[Method (computer science)|methods]]'').
 
Object-oriented programming is a coding foundation that makes concepts such as [[social media platforms]], [[Chat room|chat rooms]], and some other kinds of interactive [[Website|websites]] possible.<ref name=":022">{{Cite book |last=Salamone |first=Frank A. |title=Encyclopedia of Religious Rites, Rituals, and Festivals |publisher=[[Routledge]] |year=2004 |isbn=0-415-94180-6 |editor-last=Levinson |editor-first=David |___location=New York |pages=300}}</ref>
 
A common feature of objects is that procedures (or methods) are attached to them and can access and modify the object's data fields. In this brand of OOP, there is usually a special name such as [[this (computer programming)|{{code|this|C++}}]] or {{code|self|swift}} used to refer to the current object. In OOP, computer programs are designed by making them out of objects that interact with one another.<ref>{{Cite journal
Line 195 ⟶ 197:
===Open recursion===
In languages that support [[open recursion]], object methods can call other methods on the same object (including themselves), typically using a special variable or keyword called <code>this</code> or <code>self</code>. This variable is ''[[name binding|late-bound]]''; it allows a method defined in one class to invoke another method that is defined later, in some subclass thereof.
 
=== OOP in virtual communities ===
There are various usages of OOP that [[virtual communities]] can take advantage of, and [[Chat room|chat rooms]] and interactive [[Website|websites]] such as [[social media platforms]] require it.<ref name=":022" />
 
[[Multi-user dungeon|MUDs]] that use object-oriented programming expand users' capabilities to interact with a game world.<ref name=":022" />
 
==OOP languages==