|
This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Artima Forums.
Message:
method cohesion when methods need to be called in order
Posted by Aravind Subramanian on 02 Mar 1999, 10:54 AM
Consider a class that encapsulates the process of sending an e-mail. setContent() //sets the content send() //sends the message Calling setContents() after calling send() while a valid call, has no effect. In other words setContents() has meaning only if it is called before a send() call. How does one represent an order in calling methods in cases where the process that detrmines the order is less obvious than the act of sending an e-mail. Thanks aravind
Replies:
|