The first job was to establish the latrine as the correct place to conduct business.
Calves were confined to a latrine and rewarded with molasses or crushed barley after peeing in it.
Next, they were given the freedom to roam around an alley outside the latrine.
Urinations in the latrine were rewarded; those in the alley were gently punished with a spray of water.
Finally, the alley that led to the latrine was extended, to allow the animals to practise self-control for longer, and over a greater distance.
Cows are fairly intelligent animals, and the lessons proved quite effective.
Of the 16 calves enrolled in the training process, 11 were considered successfully toilet-trained by the end of it.
Their overall performance, say the researchers, was roughly comparable to that of human children.
The animals managed to pee in the latrine around 77% of the time.
Dr Langbein is optimistic that his methods can be improved further.
One step would be to extend the principle to faeces, which also contains nitrogen, and is another source of nitrous oxide.
The effectiveness of the training could be boosted too, perhaps with longer-lasting lessons, or by making adjustments to rewards and punishments.
He notes that the success rate increased after repositioning the water-sprayer used to punish errant animals.
Four out of eight calves were successfully trained before it was moved, compared with seven out of eight afterwards— though the small sample size means this difference is not statistically significant.
More research, as always, is required.
The next step, says Dr Langbein, is to see if cattle on a working farm can be similarly trained.
Whether farmers will be keen is another question.
Building toilets and training animals costs time and money, after all.
But when it comes to climate change, every little helps.