Object oriented implementation of probability models