Cognizant Interview Question

How to add an attribute to an object?