MathWorks Interview Question

oops concepts