Photon Interview Question

describe factory pattern