June 2024
Beginner
520 pages
12h 20m
English
This chapter covers
In this chapter, we continue with the theme of sports reports generated by a college athletics department. The Observer Design Pattern supports the publisher–subscriber model, where one component creates data objects that subscriber components process individually, each in its own way. The publisher component doesn’t know how the subscriber components are implemented nor does it care what the subscribers do with the data.
Our example application monitors the progress of a baseball game. It prints game statistics both while the game is in progress and after it is over.
NOTE Be sure to read the introduction to part 4 for important information about design patterns ...
Read now
Unlock full access