Pentaloop interview question

Q: what is factory pattern?