Creating instance variables of an object and calling methods