Bloomberg interview question

define a class