The Theory of Thermodynamics