Originally posted by Gjorgi Var:
...my approach with method as an argument to another method may not be a good OOP...
I think it's prefectly fine from an OOP standpoint. You just want to consider how easy the code is to read, and whether you want a "handle" on the return value(s).
int d = dugh(); //here, variable d can be used elsewhere
foo(d);
foo(dugh()); //here, return value remains anonymous
[ March 27, 2005: Message edited by: marc weber ]