Observer design pattern Our Stock class is a simple POJO (Plain Old Java Object). We would like to be able to take an action whenever the price of a stock changes. Before we introduce a good solution to our problem, let's see a bad solution.