Seminar sylabus PV260 (Group 03)

Week 4 - Refactoring conditionals with polymorphism

Agenda

On this seminar, we will try to do "Parrot kata" to refactor conditional code with polymorphism and make it readable, maintainable and elegant.

Tasks

  1. Clone https://github.com/emilybache/Parrot-Refactoring-Kata
  2. Refactor code using polymorphism

Tips

  • Run tests often, do small steps
  • Create factory for creating parrots
  • Create simplest object decomposition
  • Get rid of all switches and ifs
  • Identify, what is unique to compute speed for each parrot type
  • Do better object decomposition
  • Refactor factory