Question: In Java This week I want you to write a program that contains the following methods. Each method should be tested in main() to determine
In Java
This week I want you to write a program that contains the following methods. Each method should be tested in main() to determine that it is working appropriately. 1. A method which accepts a temperature in Fahrenheit and returns the equivalent temperature in Celsius. Hint: The formula to convert Fahrenheit to Celsius is TC = (TF - 32) / 1.8 if that helps. 2. A method to calculate the number of moles for a certain mass of a chemical. It should take two parameters, the molecular mass of a substance and the total mass of the substance in grams. The number of moles is just the total mass divided by the molecular mass. Moles = Total Mass in Grams/Molecular Mass. So if I had 100 grams of Iron (Fe has a molecular mass of 55.85 see Periodic Chart) then I would have 100/55.85 = 1.7905103 Moles of Iron. 3. A method called eta() which takes a distance in miles and a speed in MPH and returns a string that displays the hours and minutes until arrival. So a function call to eta(80,55) should return the string "1 Hour 27 Minutes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
