• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is a method ?

 
amit sanghai
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi everybody,

Choices :
1)implementation of an abstraction .
2)defines the behaviour.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd say 1, though that answer could also apply to a class.
2 is more correct for an interface, but I think a case could be made to have it apply to a method.
Division by zero, out of cheese error, universe halted.
 
Ajay Patel
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i would say 2.
Because classes are implementation of abstraction.
Variables define the Properties of a class.
Methods definte the Behaviour of a class.
-Aj
[This message has been edited by Aj Patel (edited January 07, 2001).]
 
amit sanghai
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi Aj and Jeroen,
This question was from Khalid's mock exam. The answer diven is (2).
 
Kalidas Pavi
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agreed 2.
Methods can be considered as the counterparts of functions of procedural languages. Methods operates upon the data (fields) of a class and hence defines the behaviour of the class.
Kalidas
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic