Object oriented approach to genetic programming