I need help with getting my java program working properly. I want to initialize T and H so the program knows that is what it stands for within the formula when calculating the heat index, and make sure that the temperature >= 80° and the relative humidity is 40% or more only using an if statement.  Here is the formula within the program: heat index = (-42.379) + 2.04901523*T + 10.14333127*H + (-0.22475541)*T*H + (-.00683783)*T2 + (-.05481717)*H2 + .00122874*T2*H + .00085282*T*H2 + (-.00000199)*T2*H2 Attached is a screenshot of my program.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 8RQ
icon
Related questions
Question
100%

Hello,

I need help with getting my java program working properly. I want to initialize T and H so the program knows that is what it stands for within the formula when calculating the heat index, and make sure that the temperature >= 80° and the relative humidity is 40% or more only using an if statement. 

Here is the formula within the program:

heat index = (-42.379) + 2.04901523*T + 10.14333127*H + (-0.22475541)*T*H + (-.00683783)*T+ (-.05481717)*H2 + .00122874*T2*H + .00085282*T*H2 + (-.00000199)*T2*H2

Attached is a screenshot of my program. 

 

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
}
}
System.out.println("Enter the afternoon temperature: ");
String tempAfternoon = keyboard.nextLine();
System.out.println("Enter the humidity outside: ");
String humidityout = keyboard.nextLine();
System.out.println("Enter name of the city: ");
String city = keyboard.nextLine();
//setting variables for equations
T = temperature;
H = realtiveHumdity;
//adding if-else condition
if (temperature >= 0.08) {
heat Index
}
//formula for the heat index
heatIndex = (-42.379) + 2.04901523 * T + 10.14333127 * H + (-0.22475541) * T * H + (-.00683783)
System.out.printf("");
//Display results
Transcribed Image Text:31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 } } System.out.println("Enter the afternoon temperature: "); String tempAfternoon = keyboard.nextLine(); System.out.println("Enter the humidity outside: "); String humidityout = keyboard.nextLine(); System.out.println("Enter name of the city: "); String city = keyboard.nextLine(); //setting variables for equations T = temperature; H = realtiveHumdity; //adding if-else condition if (temperature >= 0.08) { heat Index } //formula for the heat index heatIndex = (-42.379) + 2.04901523 * T + 10.14333127 * H + (-0.22475541) * T * H + (-.00683783) System.out.printf(""); //Display results
9 import
SENARAN≈927~~*4ººmm
10
11
12
13
14
15
16
17
18
19
20
21
22
23
25
26
28
30
31
32
33
java.util.Scanner;
public class LETV { //LETU + TV + LETV Your LETU local weather program
public static void main(String[] args) {
//setting up variables.
final double temperate = 0.08;
final double humidity = 0.14;
double heatIndex;
int temperature;
double relativeHumidity;
Scanner keyboard = new Scanner(System.in);
//prompt the user to input temperature and humidity
System.out.println("Enter the morning temperature: ");
String tempMorning = keyboard.nextLine();
System.out.println("Enter the noon temperature: ");
String tempNoon = keyboard.nextLine();
System.out.println("Enter the afternoon temperature: ");
String tempAfternoon = keyboard.nextLine();
Transcribed Image Text:9 import SENARAN≈927~~*4ººmm 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 26 28 30 31 32 33 java.util.Scanner; public class LETV { //LETU + TV + LETV Your LETU local weather program public static void main(String[] args) { //setting up variables. final double temperate = 0.08; final double humidity = 0.14; double heatIndex; int temperature; double relativeHumidity; Scanner keyboard = new Scanner(System.in); //prompt the user to input temperature and humidity System.out.println("Enter the morning temperature: "); String tempMorning = keyboard.nextLine(); System.out.println("Enter the noon temperature: "); String tempNoon = keyboard.nextLine(); System.out.println("Enter the afternoon temperature: "); String tempAfternoon = keyboard.nextLine();
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,