Cognizant interview question

How to add an attribute to an object?