LaunchCode logo
  1. Contents
  2. 22. Interfaces and Polymorphism

22. Interfaces and PolymorphismΒΆ

  • 22.1. Introduction
    • 22.1.1. Polymorphism
  • 22.2. Interfaces
    • 22.2.1. Creating an Interface
      • 22.2.1.1. Method Signatures
      • 22.2.1.2. Static Methods
      • 22.2.1.3. Default Methods
    • 22.2.2. Implementing an Interface
    • 22.2.3. Benefits of Using Interfaces
    • 22.2.4. Check Your Understanding
  • 22.3. Interfaces and Abstract Classes
    • 22.3.1. Check Your Understanding
  • 22.4. Interfaces In The Wild
    • 22.4.1. IComparer<T>
    • 22.4.2. IEnumerable<T>
    • 22.4.3. IList<T>
    • 22.4.4. IDictionary<TKey, TValue>
    • 22.4.5. Check Your Understanding
  • 22.5. Unit Testing and Interfaces
    • 22.5.1. Check Your Understanding
  • 22.6. Exercises: Interfaces and Polymorphism
    • 22.6.1. Getting Started
    • 22.6.2. Sorting Flavors by Name
      • 22.6.2.1. Create a Sorting Class
      • 22.6.2.2. Sorting the Flavors List
    • 22.6.3. Sorting Cones by Cost
    • 22.6.4. Bonus Mission
    • 22.6.5. Next Steps
  • 22.7. Studio: Spinning the Discs
    • 22.7.1. Getting Ready
    • 22.7.2. Disc Project Overview
    • 22.7.3. Consider Generic Behaviors
    • 22.7.4. Consider Class-Specific Behavior and Data
    • 22.7.5. Code the Interface
    • 22.7.6. Code the Abstract Class
    • 22.7.7. Complete the Disc Classes
    • 22.7.8. Add Method Calls to Main
    • 22.7.9. Bonus Missions: Other Discs & Disks?
  • ← 21.9. Studio: Fun with Quizzes
  • 22.1. Introduction →

Back to top