artima.com

Part I. Objects
People-Oriented API Design
by Bill Venners

<<  Page 13 of 20  >>

Advertisement

Guideline 6. Design Experts that use their state to decide how to behave

The basic and most common object design, the expert, has state, stored in instance variables, and behavior, contained in instance methods. An expert can be mutable or immutable. You can ask an expert to provide a service for you by invoking one of its methods. The method provides the service by taking actions, possibly changing the object's state, and returning.

<<  Page 13 of 20  >>

People-Oriented API Design | Contents | Book List | Print | Email | First Page | Previous | Next

Last Updated: Sunday, May 11, 2003
Copyright © 1996-2003 Artima Software, Inc. All Rights Reserved.
URL: http://www.artima.com/objectdesign/object13.html
Artima.com is created by Bill Venners