Question

In: Computer Science

The client needs this program written in Java. Your team is tasked to create a program...

The client needs this program written in Java. Your team is tasked to create a program that converts Fahrenheit to Celsius. Fahrenheit temperature of 87.6 degrees. Convert it to Celsius, and display the temperature in both units. Your output should look similar to the following:

Fahrenheit Temperature: 87.6
Celsius Temperature: 30.88

Solutions

Expert Solution

Java program to convert Fahrenheit to Celsius

Code:

public class Main
{
        public static void main(String[] args) {
                //initializing fahrenheit to 87.6
                double fahrenheit=87.6;
                //declaring celsius
                double celsius;
                //converting fahrenheit to celsius
                celsius=(( 5 *(fahrenheit - 32.0)) / 9.0);
                //printing the results
                System.out.println("Fahrenheit Temperature: "+fahrenheit);
                System.out.printf("Celsius Temperature: %.2f",celsius);
        }
}

Code Screenshot:

Output:


Related Solutions

The following program will be written in JAVA. Create a class called complex performing arithmetic with...
The following program will be written in JAVA. Create a class called complex performing arithmetic with complex numbers. Write a program to test your class.                         Complex numbers have the form:                         realPart + imaginaryPart * i                                               ___                         Where i is sqrt(-1)                                                 Use double variables to represent data of the class. Provide a constructor that enables an object of this class to be initialized when it is declared. The constructor should contain default values in...
Problem specifications: You are tasked with developing a complete temperature conversion program in Java. Your program...
Problem specifications: You are tasked with developing a complete temperature conversion program in Java. Your program should: -prompt the user with the following menu: -1-Convert Fahrenheit to Celcius -2-Convert Celcius to Fahrenheit -3-Quit Program The menu must be coded in its own method. -If user select option 1 then call a method that prompts the user to enter a value in degrees Fahrenheit and return it back to main. -call a method that converts from Fahrenheit to Celcius -call a...
Develop a written capital acquisition plan for a minor league sports team. The sports team needs...
Develop a written capital acquisition plan for a minor league sports team. The sports team needs to raise $1,000,000 to pay for stadium renovations. Their seasonal profit is $100,000. What methods could they use to acquire the needed capital? Discuss three methods of raising the necessary funds and the benefits and drawbacks of each.
Develop a written capital acquisition plan for a minor league sports team. The sports team needs...
Develop a written capital acquisition plan for a minor league sports team. The sports team needs to raise $1,000,000 to pay for stadium renovations. Their seasonal profit is $100,000.
Using JAVA Create a class Client. Your Client class should include the following attributes: Company Name...
Using JAVA Create a class Client. Your Client class should include the following attributes: Company Name (string) Company id (string) Billing address (string) Billing city (string) Billing state (string) Write a constructor to initialize the above Employee attributes. Create another class HourlyClient that inherits from the Client class.   HourClient must use the inherited parent class variables and add in hourlyRate and hoursBilled. Your Hourly Client class should contain a constructor that calls the constructor from the Client class to initialize...
WRITE CODE IN JAVA it is now your turn to create a program of your choosing....
WRITE CODE IN JAVA it is now your turn to create a program of your choosing. If you are not sure where to begin, think of a task that you repeat often in your major that would benefit from a program. For example, chemistry unit conversions, finding the area for geometric shapes, etc. You can also create an interactive story that changes based on the user input/decisions. The possibilities are endless. The program must include instructions for the user. Be...
Program should be written in Java a) Write a program that asks the user to enter...
Program should be written in Java a) Write a program that asks the user to enter the approximate current population of India. You should have the computer output a prompt and then YOU (as the user should enter the population.)  For testing purposes you may use the value of 1,382,000,000 from August 2020. Assume that the growth rate is 1.1% per year. Predict and print the predicted population for 2021 and 2022. The printout should include the year and the estimated...
This code must be written in Java. This code also needs to include a package and...
This code must be written in Java. This code also needs to include a package and a public static void main(String[] args) Write a program named DayOfWeek that computes the day of the week for any date entered by the user. The user will be prompted to enter a month, day, and year. The program will then display the day of the week (Sunday..Saturday). The following example shows what the user will see on the screen: This program calculates the...
Create a program in JAVA that displays a design or picture for someone in your quarantine...
Create a program in JAVA that displays a design or picture for someone in your quarantine household/group: a pet, a parent, a sibling, a friend. Make them a picture using the tools in TurtleGraphics and run your program to share it with them! Use a pen object, as well as any of the shape class objects to help you create your design. You must use and draw at least 5 shape objects. - You must use a minimum of 4...
You and your team are tasked with analyzing the AHQA, by reviewing their website at www.ahqa.org,...
You and your team are tasked with analyzing the AHQA, by reviewing their website at www.ahqa.org, paying special attention to the benefits of becoming a Quality Improvement Organization member (QIO). After reviewing the AHQA, discuss with your team the best practices and skills needed to ensure you can properly communicate these new guidelines of quality improvement to your staff. You must consider the importance of mentoring, providing feedback and listening to as well as incorporating staff input into your new...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT