Bloomberg Interview Question

Q. Hackerrank question involving class objects.