In object-oriented programming a method is