NVIDIA interview question

open closed principle in oops