Goldman Sachs Interview Question

They asked me more specific about oops concept