What is the difference between method and message?
Answers were Sorted based on User's Feedback
Answer / smita
Message:
Objects communicate by sending messages to each other. A
message is sent to invoke a method.
Method:
Provides response to a message. It is an implementation of
an operation.
Is This Answer Correct ? | 128 Yes | 17 No |
Answer / dd
Method is a function or procedure that is defined for a
class and typically can access the internal state of an
object of that class to perform some operation. While
message is refer to instruction that is send to object which
will invoke the related method.
Is This Answer Correct ? | 61 Yes | 6 No |
Answer / scott
A message is any packet of communication between objects.
The objects may be in the same program, or they may be on
different systems. It simply doesn't matter.
A method is a block of code attached to an object by some
means. It may be implicitly attached by means of a class,
or it may be an anonymous closure attached to an arbitrary
attribute of the object.
Is This Answer Correct ? | 18 Yes | 4 No |
Answer / rajputvishal
A message is an instruction to perform some operation send by an object to another object which will perform the operation.
A method is the implementation which is executed after receiving the message
Is This Answer Correct ? | 14 Yes | 2 No |
Answer / earvinyuvi
Message:
Objects communicate by sending messages to each other. A
message is sent to invoke a method.
Method:
Provides response to a message. It is an implementation of
an operation.
Is This Answer Correct ? | 5 Yes | 2 No |
structure contains int, char, float how it behaves for big endian and little endian?
Any one help me plzzzz..... i have an assignment...... that is ______*********_______ Write a program that takes an equation as a string and does the following: Solve 8 parts to achieve 100% 1 - 5 are compulsory. Input: 2x^2+3x+4=0 1) read a quadratic equation 2) print its coefficients (coefficients range is 0 to 9) 3) print the solution of the equation 4) tackle imaginary solution e.g. ( (2+3i), (2-3i) ) 5) allow spaces within the input 6) after solving one equation; ask for an other, terminate on empty line. * 7) tackle negative values as well * 8) tackle more than one values of same exponent (e.g. 2x^2 + 3x^2 + 4x + 3 = 0)* 9) use strtok * 10) print the solution in fractions e.g. 1.5 should be printed as (1)1/2 * 11) coefficient can be greater than 9** 12) values on both sides of the ‘=’ sign** 13) plot the graph of the polynomial** 14) use a compiler other than Borland** 15) submit before May 25, 2009 11:59 PM ** _______******________ plz send me c++ code at sweety.alvi@gmail.com
Explain Text Manipulation Routines?
What is type of 'this' pointer?
Is c++ a dying language?
List different attributes in C++?
What is wrapper class in c++?
what is the behaviour of C and C++ compiler for the below statements. int *p; p = malloc(100); Is the behaviour same ? or different ?
How can you quickly find the number of elements stored in a static array? Why is it difficult to store linked list in an array?
If you want to share several functions or variables in several files maitaining the consistency how would you share it?
When is a template a better solution than a base class?
What are the advantages of using const reference arguments in a function?