MathWorks Interview Question

Gave me code snippet and asked me the output. OOP based question