Iterator Pattern Baljeet Sandhu 20060621
Upcoming SlideShare
Loading in...5
×
 

Iterator Pattern Baljeet Sandhu 20060621

on

  • 1,049 views

 

Statistics

Views

Total Views
1,049
Views on SlideShare
1,048
Embed Views
1

Actions

Likes
0
Downloads
9
Comments
0

1 Embed 1

http://www.slideshare.net 1

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Iterator Pattern Baljeet Sandhu 20060621 Iterator Pattern Baljeet Sandhu 20060621 Presentation Transcript

  • Iterator Pattern Presented by Baljeet Sandhu - 21 st June 06 Based on Head First Design Patterns by Elisabeth Freeman, Eric Freeman, Bert Bates, Kathy Sierra
    • Ace Group
      • Suburban hardware reseller
    • Two Divisions
      • Desktop division
      • Laptop Division
      • Each group manages its own inventory
    • Provide integrated view of inventory
    Scenario
  • Inventory Item - Common to both divisions
  • Desktop division – Inventory Manager
  • Laptop division – Inventory manager
  • Inventory Printer
  • Encapsulate iteration
  • Implement Iterator for Laptop Division
  • The new design..
  • InventoryPrinter revised
  • What did we improve..
    • Do not need to know the implementation
    • Class does not have to manage iteration
    Use an interface, uniform way of accessing collections
  • Iterator pattern Provides a way to access the elements of an aggregate object without exposing its underlying representation