[Tutor] oo design/interaction quandary

Alan Gauld alan.gauld at btinternet.com
Sat Dec 26 17:06:04 CET 2009


"Brian Jones" <bkjones at gmail.com> wrote

> My app launches threads that each consume messages from a queue, send 
> them
> to a processor object, and then the processor needs to return the message 
> to
> the main thread -- if the processing was successful -- and then the main
> thread puts the message into a different queue.

Why don't the messages munge and process themselves?
What is the purpose of the processor and munger classes?
Aren't they just functions and therefore should e metjods of
the thing upon which they operate - ie Message?

HTH,

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/ 




More information about the Tutor mailing list