10.11 Conclusion

 < Day Day Up > 



10.11 Conclusion

This chapter has looked at different methods of reuse. If no state needs to be saved, then procedural reuse, creating a method, works fine; however, if a state must be saved for the reuse, then some form of object reuse is necessary. Object reuse means that a class definition must be implemented so that an object can be instantiated to store the state. If the only purpose of the object is to provide for reuse, then the object is called a utility object. The two ways to implement object reuse are composition and classification. If the object that is providing the reuse is a utility object, then the only consideration regarding how to design the object is to make the properties of the object available. If this is true, then composition is preferred over classification, as composition designs generally have higher cohesion and lower coupling.



 < Day Day Up > 



Creating Components. Object Oriented, Concurrent, and Distributed Computing in Java
The .NET Developers Guide to Directory Services Programming
ISBN: 849314992
EAN: 2147483647
Year: 2003
Pages: 162

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net