Regami Solutions interview question

implement the single inheritance concept