Amdocs interview question

OOP Concepts: Explained with code.