EPAM Systems Interview Question

code for abstract factory pattern