Activities at Lake LazyDays As activity directory at Lake LazyDays Resort, it is your job to suggest appropriate activities to guests based on the weather: temp >= 80: 60 <= temp < 80: 40 <= temp < 60: temp < 40: swimming tennis golf skiing 1. Write a program that prompts the user for a temperature, then prints out the activity appropriate for that temperature. Use a cascading if, and be sure that your conditions are no more complex than necessary. 2. Modify your program so that if the temperature is greater than 95 or less than 20, it prints "Visit our shops!". (Hint: Use a boolean operator in your condition.) For other temperatures print the activity as before.

EBK JAVA PROGRAMMING
8th Edition
ISBN:9781305480537
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 12PE
icon
Related questions
Question
Activities at Lake LazyDays
As activity directory at Lake LazyDays Resort, it is your job to suggest appropriate activities to guests based on the weather:
temp >= 80:
swimming
60 <= temp < 80:
tennis
40 <= temp < 60:
golf
skiing
temp < 40:
Write a program that prompts the user for a temperature, then prints out the activity appropriate for that temperature. Use
a cascading if, and be sure that your conditions are no more complex than necessary.
1.
2. Modify your program so that if the temperature is greater than 95 or less than 20, it prints "Visit our shops!". (Hint: Use
a boolean operator in your condition.) For other temperatures print the activity as before.
Transcribed Image Text:Activities at Lake LazyDays As activity directory at Lake LazyDays Resort, it is your job to suggest appropriate activities to guests based on the weather: temp >= 80: swimming 60 <= temp < 80: tennis 40 <= temp < 60: golf skiing temp < 40: Write a program that prompts the user for a temperature, then prints out the activity appropriate for that temperature. Use a cascading if, and be sure that your conditions are no more complex than necessary. 1. 2. Modify your program so that if the temperature is greater than 95 or less than 20, it prints "Visit our shops!". (Hint: Use a boolean operator in your condition.) For other temperatures print the activity as before.
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
Mathematical functions
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning