Method (computer programming): Difference between revisions

Content deleted Content added
Minor-
By mistake
Tags: Visual edit Mobile edit Mobile web edit
Line 1:
A '''method''' (or '''message''') in [[object-oriented programming]] (OOP) is a [[Procedure (computer science)|procedure]] associated with an [[Object (computer science)|object]]. An object is made up of data and behavior, which form the interface that an object presents to the outside world. Data is represented as [[Property (programming)|properties]] of the object and behavior as methods. For example, a <code>Window</code> object would have methods such as <code>open</code> and <code>close</code>, while its state (whether it is opened or closed by) would be a property.
 
In [[class-based programming]], methods are defined in a [[class (computer science)|class]], and objects are instances of a given class. One of the most important capabilities that a method provides is method overriding. The same name (e.g., <code>area</code>) can be used for multiple different kinds of classes. This allows the sending objects to invoke behaviors and to delegate the implementation of those behaviors to the receiving object. Method in Java programming sets the behaviour of class object. For example, an object can send an <code>area</code> message to another object and the appropriate formula is invoked whether the receiving object is a <code>rectangle</code>, <code>circle</code>, <code>triangle</code>, etc.
Line 168:
== References ==
{{refbegin}}
*{{cite book|ref=harv|last=JANA|first=DEBASISH|title=C++ AND OBJECT-ORIENTED PROGRAMMING PARADIGM|url=http://books.google.com/books?id=DnsM0WD-6iMC&pg=PA131|title=C++ AND OBJECT-ORIENTED PROGRAMMING PARADIGM|last=JANA|first=DEBASISH|date=1 January 2005|publisher=PHI Learning Pvt. Ltd.|isbn=978-81-203-2871-6|ref=harv}}
*{{cite book|ref=harv|last=Sengupta|first=Probal|title=Object-Oriented Programming: Fundamentals And Applications|url=http://books.google.com/books?id=ZLzt5WtsdzIC&pg=PA50|title=Object-Oriented Programming: Fundamentals And Applications|last=Sengupta|first=Probal|date=1 August 2004|publisher=PHI Learning Pvt. Ltd.|isbn=978-81-203-1258-6|ref=harv}}
*{{cite book|refurl=harv|lasthttp://books.google.com/books?id=Svenk|firstMiq73i_J1i4C&pg=GoranPA36|title=Object-oriented Programming: Using C++ for Engineering and Technology|urllast=http://books.google.com/books?id=Miq73i_J1i4C&pg=PA36Svenk|yearfirst=2003Goran|publisher=Cengage Learning|year=2003|isbn=0-7668-3894-3|ref=harv}}
*{{cite book|ref=harv|author=Balagurusamy|title=Object Oriented Programming with C++|url=http://books.google.com/books?id=WCHZAgAAQBAJ&pg=PA74|yeartitle=2013Object Oriented Programming with C++|publisher=Tata McGraw-Hill Education|year=2013|isbn=978-1-259-02993-6|ref=harv|author=Balagurusamy}}
*{{cite book|refurl=harv|last1http://books.google.com/books?id=Kirch-Prinz|first1yhuY0Wg_QcC&pg=Ulla|last2=Prinz|first2=PeterPA181|title=A Complete Guide to Programming in C++|urllast2=http://books.google.com/books?id=-yhuY0Wg_QcC&pg=PA181Prinz|yearfirst2=2002Peter|publisher=Jones & Bartlett Learning|year=2002|isbn=978-0-7637-1817-6|ref=harv|last1=Kirch-Prinz|first1=Ulla}}
*{{cite book|refurl=harv|lasthttp://books.google.com/books?id=Conger|first1F6ipojt7DcC&pg=DavidPA79|title=Creating Games in C++: A Step-by-step Guide|urllast=http://books.google.com/books?id=1F6ipojt7DcC&pg=PA79Conger|yearfirst=2006David|publisher=New Riders|year=2006|isbn=978-0-7357-1434-2|ref=harv}}
*{{cite book|ref=harv|last=Skinner|first=M. T.|title=The Advanced C++ Book|url=http://books.google.com/books?id=fgGLZ7WYxCMC&pg=PA97|yeartitle=1992The Advanced C++ Book|last=Skinner|first=M. T.|publisher=Silicon Press|year=1992|isbn=978-0-929306-10-0|ref=harv}}
*{{cite book|ref=harv|author=Love|title=Linux Kernel Development|url=http://books.google.com/books?id=NXVkcCjPblcC&pg=PA18|title=Linux Kernel Development|date=1 September 2005|publisher=Pearson Education|isbn=978-81-7758-910-8|ref=harv|author=Love}}
*{{cite book|refurl=harv|last1http://books.google.com/books?id=DEHURIfxUVrhjD4k0C&pg=PA78|first1title=SATCHIDANANDAOBJECT-ORIENTED PROGRAMMING USING C++|last2=JAGADEV|first2=ALOK KUMAR|last3=RATH|first3=AMIYA KUMAR|title=OBJECT-ORIENTED PROGRAMMING USING C++|url=http://books.google.com/books?id=fxUVrhjD4k0C&pg=PA78|date=8 May 2007|publisher=PHI Learning Pvt. Ltd.|isbn=978-81-203-3085-6|ref=harv|last1=DEHURI|first1=SATCHIDANANDA}}
{{refend}}