Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The following program command-line inputs are a weekday (Monday through Sunday), the weekday temperature in Fahrenheit, and the conversion scale. It displays the converted temperature
The following program command-line inputs are a weekday (Monday through Sunday), the weekday temperature in Fahrenheit, and the conversion scale. It displays the converted temperature (Kelvin or Celsius) for the weekday. public class Convert { Run Debug public static void main (String() args) { String weekDay = args (@); double temperatureF = Double.parseDouble(args [1]); int scale = Integer.parseInt(args (2]); // 1 for Kelvin, 2 for Celsius if (scale == 1){ double result = (temperatureF - 32) * 5/9 + 273.15; System.out.println(weekDay + " temperature in Kelvin is " + result); } else if ( scale == 2 ) { double result = (temperatureF - 32) * 5/9; System.out.println(weekDay + " temperature in Celsius is " + result); } else { System.out.println("Incorrect scale: (1)-Kelvin, [2]-Celsius"); } } Which of the following statements executes the program properly displaying the converted temperature? Choose all that apply. java Convert Monday 78 2 java Convert 89 Monday 1 java Convert Thursday 89.4 1 java Convert Sunday 23.6 2 java Convert Tuesday 32 1 All of the above
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started