Wabtec interview question

C++, oops concepts, logical and coding