Accenture interview question

Basic oops Concepts and pattern program