a question on conversion logic
<p>I am designing a unit converter using android.i m using logic which is not nice logic i think and i m giving some code here too.can anyone suggest me any better logic????</p>

<pre><code>public void temperature(String value1,String value2)
        {
            if(value1.equals("Celsius") &amp;&amp; value2.equals("fahrenheit") )
            {
                double i=Double.parseDouble(at1.getText().toString());
                double value=i*33.8;
                Double d=new Double(value);
                at2.setText(d.toString());
            }
            else if(value1.equals("fahrenheit") &amp;&amp; value2.equals("Celsius"))
            {
                double i=Double.parseDouble(at1.getText().toString());
                double value=i*(-17.2222);
                Double d=new Double(value);
                at2.setText(d.toString());
            }
</code></pre>

<p>There is like this many unit in every category like angle,computer.this is only a small example of temperature category.</p>
