introduced in 1902 as a way to control humidity in a brooklyn printing plant , air conditioning was the brainchild of willis carrier , a cornell university graduate who went on to refine his invention into a compact , practical device capable of cooling everything from movie theaters to passenger trains .