Skip to lesson

Must-do problems: Abstraction and Interfaces

Every problem here is a small design: decide what is the contract, what is shared code in an abstract parent, and what each class writes for itself. Write the types first, keep main working only through the contract, and run every test before opening a hint.

What you will learn

What you will learn

  • Choose an abstract class for a family and an interface for an ability
  • Write template methods that call abstract steps
  • Use default, static and clashing default methods in interfaces
  • Pass small rules as lambdas of a functional interface

Sign in to continue this lesson

Create an account to read every lesson, practise with the exercises and keep track of your progress.