Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases New Opportunities For Connected Data

Authors: Ian Robinson, Jim Webber, Emil Eifrem

2nd Edition

1491930896, 978-1491930892

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago