Question: 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 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!