| | | | | |

List Implementation Pitfalls

  • Maintain all three data fields (first, last, size)
  • Special cases are tricky
  • Suggested cases:
    • empty list
    • list with one element
    • list with more than one element
  • Best debugging tools:
    • YOUR BRAIN: Think about what you are doing
    • Careful analysis and design
    • Writing code for readability and self-documention
  • Best times to debug:
    • DESIGN TIME
    • Coding time

| | Top of Page | 8. A Generic List Class and Linked Lists - 15 of 19