GlobalLogic interview question

Basic and oops concept , testing questions