Degree Of Freedom In Thermodynamics