Behavioral Patterns - Visitor Pattern Exercise
behavioral-patterns-visitor-pattern-exercise The Visitor Pattern represents an operation to be performed on elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates. In this exercise, we will create a bookstore inventory structure that collects books, movies, and music. We will add shared behaviors across this hierarchical structure by using the Visitor Pattern. Reading Materials https://en.wikipedia.org/wiki/Visitor_pattern (15 minutes reading) Practice Materials Use the Visitor Pattern to create a bookstore inventory that meets the following requirements: the bookstore inventory collects books , movies , and music . all these three media types have their own members and one common member - title add one behavior to the media so that the operation can print out all the titles. add second behavior to the media so that the operation can print out details of all media an