# Hello there everyone!

• March 31st, 2013, 09:53 AM
fon90
Hello there everyone!
Write a class that contains the following two methods:

/** Converts from Celsius to Fahrenheit */

Hello there guys please I need help with this program in java
this what i have done so far , please any help would much appreciated
Thanks.

public class EX5_8{
public static void main(String args[]){
public static double celsiusToFahrenheit(double celsius){
return celsius=(5.0/9.0) * fahrenheit - 32;
}
public static double fahrenheitToCelsius(double fahrenheit){
return fahrenheit=(9.0/5.0) * fahrenheit + 32;
}
System.out.println("|Celsius |Fahrenheit||Celsius |Fahrenheit| \n");
for(double i=40,j=120 ;i<=31 && j<=-1.11;i-=1,j-=10){
System.out.printf("%3.1f|%11.1f|%3.1f|%8.2f|\n",i, (i*(9.0/5)+32),j,j/i*(5.0/9)-32);

Find below is the complete question

public static double celsiusToFahrenheit(double celsius)

/** Converts from Fahrenheit to Celsius */
public static double fahrenheitToCelsius(double fahrenheit)

The formula for the conversion is:

fahrenheit = (9.0 / 5) * celsius + 32

Write a test program that invokes these methods to display the following tables:
Celsius Fahrenheit Fahrenheit Celsius
40.0 104.0 120.0 48.89
39.0 102.2 110.0 43.33
...
32.0 89.6 40.0 4.44
31.0 87.8 30.0 -1.11
• March 31st, 2013, 10:43 PM
jps
Re: Hello there everyone!
Welcome fon90
If you have a question please post it in an appropriate area, this is for saying hi.
Also please not that posting homework instructions is not posting a question.