Bounteous interview question

What is factory method design pattern and how would you implement it.