In Time Tec interview question

oops concepts ,