American Express Interview Question

Basics of oops