The Subject represents the core (or independent or common or engine) abstraction. Observer represents the variable (or dependent or optional or user interface) abstraction. The Subject prompts the Observer objects to do their thing. Each Observer can call back to the Subject as needed.This pattern is depicted in the class diagram of the case study as was the case of the Composite design pattern. Therefore, this pattern has a definite application in the case study based on the requirements. Let us look at some of the reasons where it would be necessary to incorporate this pattern: Consider the scenario when a reservation is made. The requirement is that reservation will be cancelled and the ticket made available if the customer fails to pay for the ticket at least 20 minutes before the scheduled time of the show.The Iterator is one of the simplest and most frequently used of the design patterns. The Iterator pattern allows you to move through a list or collection of data using a standard interface without having to know the details of the internal representations of that data. In addition you can also define special iterators that perform some special processing and return only specified elements of the data collection.An aggregate object such as a list should give you a way to access its elements without exposing its internal structure. Moreover, you might want to traverse the list in different ways, depending on what you need to accomplish. But you probably don’t want to bloat the List interface with operations for different traversals, even if you could anticipate the ones you’ll require. You might also need to have more than one traversal pending on the same list. Designing with Patterns.
Please type your essay title, choose your document type, enter your email and we send you essay samples