This may seem like a minor point, but it is a very key difference from encapsulation. Encapsulation is the process of hiding information about one class in an implementation class. Strategy is the process of storing information in a data structure, which is very different from encapsulation. In this case, the strategy pattern is hiding the information about the code used to implement strategies in a data structure. This approach is very different from encapsulation because code is not hidden. It is just not packaged in an implementation class. Code is, in fact, very visible in the data structure.
Another key difference from encapsulation is that strategies and implementations are interchangeable. If the code is not packaged in an implementation class, then it does not have to be used in the same class as the strategy. The only requirement is that the strategy knows about the code it uses. This is a powerful aspect of strategy that allows it to be used anywhere. As a result, the strategy can be used in any context. The strategy implementation can use any framework, architecture, or library and the strategy only needs to know that the code implements its behaviors. The strategy implementation does not have to use the same frameworks, architectures, or libraries that the strategy uses.
Avoiding code duplication. For example, consider two superclasses that behave differently: subclass A should always return the same data, and subclass B should always return a different data. A client may request that a parent class return either the same data or a different data.
 In a criminal case, the federal district court is the federal trial court. In the federal appellate system, the United States Court of Appeals for the Second Circuit is the court of appeals for the circuit that includes New York. There is no special court of appeals for the district.
 A person who, at the time of the occurrence, is employed by or associated with a news organization as a reporter, sub-editor, editor, managing editor, reporter, or other employee engaged in covering news and current events, or who has reason to believe he or she is or may be called upon to report on the same, is a “media party.” 827ec27edc