3.5 Responsibilities of Objects


3.5 Responsibilities of Objects

An object-oriented application is driven by a set of collaborating objects, each one of which has some responsibility to fulfill. The application delegates to each object its own share of the overall task to be accomplished. Typically, the application starts by delegating the overall task to one or more objects. This means that the program starts by requesting some service(s) from these objects.

These objects carry out their responsibilities, and can delegate part of their work to other objects. The chain of delegations continues until there is no more work needed to delegate.

This approach of object-oriented design is called the responsibility-driven design because the responsibilities of the objects are identified first in the software development process. The principle of information hiding supports this design approach. Every object advertises the task it can carry out but without revealing how it will implement the task.




Object-Oriented Programming(c) From Problem Solving to Java
Object-Oriented Programming (From Problem Solving to JAVA) (Charles River Media Programming)
ISBN: 1584502878
EAN: 2147483647
Year: 2005
Pages: 184

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