Agnity Interview Question

oops concept