strategy
Download
Skip this Video
Download Presentation
STRATEGY

Loading in 2 Seconds...

play fullscreen
1 / 9

STRATEGY - PowerPoint PPT Presentation


  • 63 Views
  • Uploaded on

STRATEGY. Object Behavioral Pattern. You are at the Pub two weeks before Fall Formal and still don’t have a date! All of a sudden a girl who you had a crush on during o-week walks in.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' STRATEGY' - cody-duffy


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
strategy

STRATEGY

Object Behavioral Pattern

slide2

You are at the Pub two weeks before Fall Formal and still don’t have a date! All of a sudden a girl who you had a crush on during o-week walks in

There are many different ways that you could approach this situation. Each approach requires a different methodology, but achieves the same goal (i.e. you have confronted your crush)

intent of strategy
Intent of Strategy
  • Define a family of algorithms, encapsulate each one, and make them interchangeable
  • Strategy provides a common interface for all encapsulated algorithms and allows the algorithm to vary independently of the client
when is strategy used
When is Strategy used?
  • When many related classes differ only in their behavior
  • Different variants of an algorithm exist in order to reflect different space/time trade-offs
airline ticket reservations
Airline Ticket Reservations
  • There are many different ways to obtain an airline ticket. Depending on your utility for time and money, you may be looking for the cheapest flight available or you might want to find the quickest flight to your destination.
ad