///////////////////////////////////////////////////////////////////////// // replyProduct.cpp - implements reply method // // // // Demonstrates use of a worker class that implements part of an // // interface's methods. // // // // Jim Fawcett, CSE687 - Object Oriented Design, Spring 2001 // ///////////////////////////////////////////////////////////////////////// #include #include "replyProduct.h" using namespace std; //----< void constructor >----------------------------------------------- replyProduct::replyProduct() { cout << "\n constructing replyProduct"; } //----< destructor >----------------------------------------------------- replyProduct::~replyProduct() { cout << "\n destroying replyProduct"; } //----< accept a string from requestProduct >---------------------------- void replyProduct::send(const string &message) { fromRequest = message; } //----< reply method >--------------------------------------------------- string replyProduct::reply() { return (fromRequest + " sent back by replyProduct"); }