Skip to Content
Java Program Design: Principles, Polymorphism, and Patterns
book

Java Program Design: Principles, Polymorphism, and Patterns

by Edward Sciore
December 2018
Intermediate to advanced
465 pages
8h 5m
English
Apress
Content preview from Java Program Design: Principles, Polymorphism, and Patterns
© Edward Sciore 2019
Edward ScioreJava Program Designhttps://doi.org/10.1007/978-1-4842-4143-1_10

10. Observers

Edward Sciore1 
(1)
Newton, MA, USA
 

The state of a program changes over time, as new objects get created and existing objects are modified. The program may respond to some of these change events. For example, a large deposit to a foreign-owned bank account might initiate a process that checks for illegal activity. The program may also respond to certain input events such as mouse actions and keyboard entries. For example, a mouse click on a button is normally responded to, but a mouse click on a label is often ignored.

The use of observers is a general-purpose technique for managing a program’s responses to events. An object can maintain ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Design Patterns and SOLID Principles with Java

Design Patterns and SOLID Principles with Java

Róbert Kohányi
Design Patterns and Best Practices in Java

Design Patterns and Best Practices in Java

Kamalmeet Singh, Ianculescu, Lucian-Paul Torje

Publisher Resources

ISBN: 9781484241431Purchase LinkPublisher Website