Question: Part 1 - Arithmetic Operations, Methods Lab 2 A Write a method called kelvins that takes an argument f , the temperature in degrees Fahrenheit
Part Arithmetic Operations, Methods
LabA
Write a method called kelvins that takes an argument f the temperature in degrees Fahrenheit of type double and returns the temperature in degrees Kelvin also a double
Here is the mathematical formula for conversion:KF
Write another method called temperaturePrinter that takes arguments f and k two doubles and prints the following message to the screen:
### deg. F equals ### deg. K
Where ### are correct values in degrees Fahrenheit f and Kelvin k
Test your methods with different values for Fahrenheit. Either print the results of each test as they are run and record the results of the tests in comments at the bottom of your code before submitting.
Part More Arithmetic Operations and Methods
Write a method called secondTime that takes an argument, an integer corresponding to a number of seconds. secondTime computes and displays the equivalent time in hours, minutes and seconds, and prints the result to console in the format:
seconds ::
Meaning hours, min, seconds
Hint: Use a tool like ToolsNoobsLinks to an external site. to help determine the correct answer so that you can test your code.
Write another method called inSeconds that takes three integer arguments: hours, minutes and seconds. It computes and returns the exact time in seconds, and prints the following message to the console:
:: seconds
Copy the following tests and paste them in your code and replace X with the outputs you got.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
