Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please write java code for the following Algorithm Pseudocode DISPLAY Welcome to the Local Weather Tracker App! INITIALIZE HotDayCount, NiceDayCount, ModerateDayCount, ColdDayCount, TotalDays, SumOfTemperatures SET
Please write java code for the following Algorithm Pseudocode
DISPLAY "Welcome to the Local Weather Tracker App!"
INITIALIZE HotDayCount, NiceDayCount, ModerateDayCount, ColdDayCount, TotalDays, SumOfTemperatures
SET continueEnteringData true
WHILE continueEnteringData
INPUT "Enter the high temperature for the day: temperature
IF temperature THEN
HotDayCount HotDayCount
ELSE IF temperature AND temperature THEN
NiceDayCount NiceDayCount
ELSE IF temperature AND temperature THEN
ModerateDayCount ModerateDayCount
ELSE
ColdDayCount ColdDayCount
SumOfTemperatures SumOfTemperatures temperature
TotalDays TotalDays
INPUT Do you want to enter data for another day? yesno: userResponse
IF userResponse is not equal to "yes" THEN
continueEnteringData false
AverageTemperature SumOfTemperatures TotalDays
DISPLAY "Temperature Categories:"
DISPLAY "Hot Days:", HotDayCount
DISPLAY "Nice Days:", NiceDayCount
DISPLAY "Moderate Days:", ModerateDayCount
DISPLAY "Cold Days:", ColdDayCount
DISPLAY "Average Temperature:", AverageTemperature
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started