Lecture 4

Java Generics & Test First Development

Learning Outcomes

At the end of this lecture, you’ll be able to:

Lecture Plan

In this lecture, we'll cover the following lessons:

  1. IndexedList ADT: Review
  2. ArrayIndexedList: An Implementation of IndexedList
  3. IndexedList ADT: Limited to Integer Values?!
  4. IndexedList ADT: Lift the Limit with Java Generics!
  5. IndexedList ADT: The syntax of Generics in Java
  6. ArrayIndexedList: Generic Implementation
  7. ArrayIndexedList: Generic Array
  8. ArrayIndexedList: Testing Correctness
  9. IndexedListTest: JUnit Framework
  10. IndexedListTest: Unit Tests
  11. Unit Tests: Easier said than done!
  12. Unit Tests: Use Descriptive Names!
  13. Unit Tests: Exercise
  14. Unit Tests: BeforeEach
  15. Unit Testing: Summary

Lessons marked with ⚡ contain exercise/activity.

Downloads