Question: Question 1 : Fall Adventure Planner Program ( use if , if - else ) Write a Java program that assists in

Question 1: Fall Adventure Planner Program (use "if","if-else") Write a Java program that assists in planning a fall outdoor adventure based on temperature and weather conditions.
Instructions:
1. Temperature and Weather Input:
Prompt the user to enter the current temperature in Celsius and the expected weather conditions (sunny, rainy, or snowy).
2. Clothing Recommendations:
- Use if-else statements to suggest appropriate clothing based on the following criteria:
- If the temperature is above \(20^{\circ}\mathrm{C}\) and sunny, recommend light clothing (e.g., t-shirt and shorts).
- If the temperature is between \(10^{\circ}\mathrm{C}\) and \(20^{\circ}\mathrm{C}\), recommend a light jacket.
- If the temperature is below \(10^{\circ}\mathrm{C}\), recommend warm clothing (e.g., a sweater and a coat).
- If it's rainy, suggest waterproof clothing regardless of the temperature.
- If it's snowy, recommend heavy winter clothing.
3. Safety Precautions:
- Additionally, provide safety tips based on the weather condition:
- For sunny weather: "Dont forget sunscreen and stay hydrated!"
- For rainy weather: "Be cautious of slippery paths!"
- For snowy weather: "Stay warm and watch out for icy conditions!"
4. Display the Recommendations:
- Print the clothing recommendations and safety precautions based on user's input.
Here are few sample outputs to illustrate the expected behavior of your program.
You may assume a perfect user i.e. a user won't input an invalid data.
Note: user input is highlighted in green.
NOTE 2:
(i) Neither use nor import any other library/package aside from: java. util.Scanner;
(ii) Neither implement nor use any custom/user-defined function(s) for any task herein.
(iii) With reference to each task herein, do NOT implement or use any of the following constructs:
iterations/loops (for{}, while{}, etc.).
NOTE 3: The solutions for Question 1 and Question 2 below are independent.
General Guidelines with reference to Writing Programs:
Include the following comments at the top of your source codes.
//---------------------------------------------------------------------
// Assignment (include number)
// Written by: (include your name and student ID)
// For COMP 248 Section (your section)- Fall 2024
//------------------------------------------------------------------
In a comment, give a general explanation of what your program does. As the programming
questions get more complex, the explanations might get lengthier.
Within your program, include relevant comments which describe the main aspects and/or
steps with respect to the reason supporting the execution of each aspect and/or step.
Display a welcome message.
Display clear prompts to users whenever you are expecting a user to enter data from the
keyboard.
All output should be displayed with clear messages and in an easy-to-read format.
End your program with a closing message so that the user knows the program has terminated.
Question 1: Fall Adventure Planner Program (use "if","if-else")
As autumn paints Canada in vibrant shades of red, orange, and gold, it's the perfect time to plan
outdoor adventures. From breathtaking hikes in national parks to cozy campfires under the starlit
sky, the season beckons you to explore its beauty. However, with the changing weather, it's
crucial to prepare for your activities. In this assignment, you will create a program to help plan
your fall adventure by assessing weather conditions, determining clothing recommendations,
and ensuring safety measures. Write a Java program that assists in planning a fall outdoor
adventure based on temperature and weather conditions.
Instructions:
Temperature and Weather Input:
Prompt the user to enter the current temperature in Celsius and the expected
weather condition (sunny, rainy, or snowy).
Clothing Recommendations:
Use if-else statements to suggest appropriate clothing based on following criteria:
If the temperature is above 20^(@)C and sunny, recommend light clothing
(e.g., t-shirt and shorts).
If the temperature is between 10^(@)C and 20^(@)C, recommend a light jacket.
If the temperature is below 10^(@)C, recommend warm clothing (e.g., a
sweater and a coat).
If it's rainy, suggest waterproof clothing regardless of the temperature.
If it's snowy, recommend heavy winter clothing.
Safety Precautions:
Additionally, provide safety tips based on the weather condition:
For sunny weather: "Dont forget sunscreen and stay hydrated!"
For rainy weather: "Be cautious of sli
###################################################
###############################################################################
Fall Adventure Planner!!!
###############################################################################
Welcome to the Fall Adventure Planner!
Enter the current temperature (}\mp@subsup{}{}{\circ}\textrm{C}):1
Enter the weather condition (sunny/rainy/snowy): sunNY
Recommended clothing: A light jacket.
Safety tip: Don't forget sunscreen and stay hydrated!
Thank you for using the Fall Adventure Planner!
Figure 4. Sample-4 o
Question 1 : Fall Adventure Planner Program ( use

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 Programming Questions!