title: Java - Kelvin to Fahrenheit conversion method
body: <p>So I'm currently working on a pretty simple program. What it does is convert either Fahrenheit or Celsius to Kelvin, and then depending on what the user requests (f or c) that kelvin value is converted and returned as either Celsius or Fahrenheit.</p>
  
  <p>My Celsius conversion seems to work just fine, but Fahrenheit is a different story. Our professor says our output must match the given example 100%, and when I give a Celsius value and request Celsius back, it always returns the value I originally put in. </p>
  
  <p>However, I got this when converting 95 Celsius to Fahrenheit: 203.28800000000007
  The value I was supposed to get was: 203.0
  Furthermore, when I put in 50 Fahrenheit and requested it to return Fahrenheit, I got this: 32.0.</p>
  
  <p>I'll post the class that contains all my conversion methods, but could anyone help me out with where I might be going wrong? It looks to me like based on my formula, it's simply returning the part of the formula that adds/subtracts 32. I've tried alternative formats of the formula, but nothing seems to be working.</p>
  
  <pre><code>public class Temperature 
  
  {
  
  // Instance variable
  
     private double degreesKelvin; // degrees in Kelvin
  
  // Constructor method: initialize degreesKelvin to zero
  
     public Temperature() 
     {
        degreesKelvin = 0;
     }
  
  // Convert and save degreesCelius in the Kelvin scale
  
     public void setCelsius(double degreesCelsius) 
     {
        degreesKelvin = degreesCelsius + 273.16;
     }
  
  // Convert degreesKelvin to Celsius and return the value
  
     public double getCelsius() 
     {
        double c = degreesKelvin - 273.16;
        return c;
     }
  
  // Convert and save degreesFahrenheit in the Kelvin scale
  
     public void setFahrenheit(double degreesFahrenheit) 
     {
        degreesKelvin = (5/9 * (degreesFahrenheit - 32) + 273);
     }
  
  // Convert degreesKelvin to Fahrenheit and return the value
  
     public double getFahrenheit() 
     {
        double f = (((degreesKelvin - 273) * 9/5) + 32);
        return f;
     }
  
  }
  </code></pre>
  
  <p>Thanks for any assistance, I tried looking for solutions to this issue, but nothing seems to work for me so far.</p>