Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

both question 2 and 3 using java see the rules below question 2 use parsedouble to input 2. Wind chill [8 points). Given the temperature

image text in transcribedimage text in transcribedboth question 2 and 3 using java see the rules below question 2 use parsedouble to input

2. Wind chill [8 points). Given the temperature T (in degrees Fahrenheit) and the wind speed v (in miles per hour), the National Weather Service defines the effective temperature (the wind chill) as follows: W = 35.74 +0.6215 T + (0.4275 T - 35.75) v^0.16 Write a program WindChill.java that takes two double command-line arguments temperature and velocity and prints the wind chill. Use Math.pow(a,b) to compute a^b. NOTE 1: a^b means a to the power of b. NOTE 2: The formula is not valid if I is larger than 50 in absolute value or if v is larger than 120 or less than 3 (assume that the input values testing your program are in range). NOTE 3: It is not necessary to round the wind chill value, display the value that is computed. % java WindChill 35.0 10.0 27.445420 3. Order check [7 points). Write a program OrderCheck.java that takes four int command-line arguments w, x, y, and z. Define a boolean variable whose value is true if the four values are either in strictly ascending order (wx>y>z), and false otherwise. Then, display the boolean variable value. NOTE 1: Do not use if statements on this program. NOTE 2: Assume that the inputs will always be integers. % java OrderCheck 5 10 15 2 false % java OrderCheck 15 11 9 4 true Observe the following rules: DO NOT use if statements on this assignment DO NOT add any import statements DO NOT add the project statement DO NOT change the class name DO NOT change the headers of ANY of the given methods DO NOT add any new class fields DO NOT use System.exit() Observe the examples output, display only what the problem is asking for

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

Step: 3

blur-text-image

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

Domain Transfer Learning With 3q Data Processing

Authors: Ahmed Atif Hussain

1st Edition

B0CQS1NSHF, 979-8869061805

More Books

Students also viewed these Databases questions

Question

explain what is meant by experiential learning

Answered: 1 week ago

Question

identify the main ways in which you learn

Answered: 1 week ago