Computational neuroethology is the computer simulation of the neural control of behavior of simpler whole animals. An object-oriented model of the nutritional physiology of the blowfly Phormia regina illustrates the biological basis of the regulation of feeding behavior in such models, using the message-passing features of object-oriented programming as an analogy of biological message-passing. The model predicts the pattern of stimulation of the foregut and abdominal stretch receptors that regulate the insect's level of activity and responsiveness to stimuli. Message-passing features of object-oriented programming were used to simulate three major physiological message-passing methods: electro-chemical (nerve impulses), chemical (hormones, synaptic neurotransmitters, and biochemical byproducts), and physical (stretch response and hydrostatic pressure effects). Object-oriented programming facilitates depiction of the anatomical locations of physiological and biochemical processes.