Source: https://www.astro.umass.edu/~schloerb/ph281/Lectures/OOP/OOP.pdf