Question: Write a program that Converts degrees Fahrenheit to Celsius degree by calling on the following method and printing out the result in celsius for fToC

Write a program that Converts degrees Fahrenheit to Celsius degree by calling on the following method and printing out the result in celsius for fToC(212):
public static double fToC(double degreesF){
return 5.0/9.0*(degreesF -32);
}
hint:
The call in the main () method :
System.out.println(212+ "Fahrenfeit is"+ fToC(212)); //why?
The program will also convert Celsius degree to degrees Fahrenheit by calling on the following method and printing out the result in Fahrenheit for cToF(100):
public static void cToF(double degreesC){
System.out.println("Celsius "+ degreesC +" is"+(9.0/5.0* degreesC +32)+" Fahrenheit"); }
hint:
The call in the main () method:
cToF(100); //why?
Compile and save the program.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!