Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

=+ What would it look like? Who should deliver it?

Answered: 1 week ago