Question: java Question 1 (40 points) Write a program to calculate and display the distance driven by a car given the car's hourly speed (miles per


Question 1 (40 points) Write a program to calculate and display the distance driven by a car given the car's hourly speed (miles per hour) and the total minutes the car has been driven. Note that if statement is NOT allowed for this program and your program must ask user to enter the necessary inputs (no fixed values for car's speed and minutes). You can use the following scenarios to test the correctness of your program. For example, if the car is 50 miles per houryand it has be driven for 30 minutes, the car will drive a distance of 25 miles. . For another example, if the car is 50 miles per hour and it has be driven for 20 minutes, the car will drive a distance of 16.66..67 miles. . For the third example, if the car is 65 miles per hour and it has be driven for 45 minutes, the car will drive a distance of 48.75 miles. You can use repl.it to write, compile and execute your program. When you are done, copy and paste your program to the box below. Question 2 (40 points) Write a program to ask user to enter the average temperatures and humidity levels for two cities (city 1 and city 2) and print message(s) according to the following. The program first compares the temperatures as follows: If city 1's temperature is greater than that of city 2, it prints that city 1 has higher temperature. If city 1's temperature equals to that of city 2, it prints that the two cities hav the temperature. If the temperature of city 1 is less than that of city 2. it prints that city 2 has higher temperature. The program then compares the humidity levels as follows: If the humidity level of the first city is greater than that of the second city, it prints that city 1 is more humid. If the humidity level of the first city equals to that of the second city, it prints that the two cities have the same humidity, If the humidity level first city is less than that of the second city, it prints that city 2 is more humid. You can use repl.it to write, compile and execute your program. When you are done, copy and paste your program to the box below. MacBook Air 80 F3 o 000 000 F4 F5 F6 57 Question 3 (20 points) Write a program that print proper air control messages according to temperature and humidity. The user should provide the values for the temperature and humidity. Remember that the temperature doesn't have to be whole numbers. The program prints the following message depending on the following: For temperature below 68, it prints "Turn on the heater." . For temperature between 68 and 79 (including 68 and 79), o If the humidity level is below 0.5, it prints "Open the windows to get fresh air." o Otherwise, it prints "Turn on the dehumidifier." For temperature above 79, it prints "Turn on the cooler
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
