EY Interview Question

Based on Oops, design patterns