Question: Purpose: At 1 1 5 degrees I recommend: EIX ME ! At 1 1 degrees I recommend: FIX NE ! At 1 2 degrees I

Purpose: At 115 degrees I recommend: EIX ME!
At 11 degrees I recommend: FIX NE!
At 12 degrees I recommend: FIX NE!
At 32 degrees I recommend: FIX NE!
At 33 degrees I recommend: FIX NE!
At 51 degrees I recommend: FIX NE!
At B1 degrees I recommend: FIX NE!
Currently, regardless of the temperature, it should say FIX ME!
Technical Items
Inside the TemperatureBasedActivity class in the recommendedActivity() method, you must use an else-
if with a trailing else where the conditional statements assign the activity to a String that is returned.
You must keep the Temperature Ranges as above and the 6 distinct activities, but your text describing
the activities can be slightly different (keep it clean!)
Sample Run ( after fixing the recommendedActivity() method)
At -15 degrees I recommend: Checkers
At -10 degrees I recommend: Checkers
At -5 degrees I recommend: Checkers
At 0 degrees I recommend: Checkers
At 5 degrees I recommend: Checkers
At 10 degrees I recommend: Checkers
@t 15 degrees I recommend: Skiing
@t 20 degrees I recommend: Skiing
At 25 degrees I recommend: Skiing
At 30 degrees I recommend: Skiing
At 35 degrees I recommend: Golf
Mt 40 degrees I recommend: Golf
At 45 degrees I recommend: Golf
At 50 degrees I recommend: Golf
At 55 degrees I recommend: Tennis
@t 60 degrees I recommend: Tennis
@t 65 degrees I recommend: Tennis
At 70 degrees I recommend: Tennis
At 75 degrees I recommend: Tennis
@t 80 degrees I recommend: Tennis
At 85 degrees I recommend: Swimming
At 90 degrees I recommend: Swimming
At 95 degrees I recommend: Swimming
At 100 degrees I recommend: Swimming
At 105 degrees I recommend: Move north
At 110 degrees I recommend: Move north
At 115 degrees I recommend: Move north
@t 11 degrees I recommend: Skiing
At 12 degrees I recommend: Skiing
At 32 degrees I recommend: Skiing
At 33 degrees I recommend: Golf
At 51 degrees I recommend: Tennis
At 8l degrees I recommend: Swimming Grading Rubric
Include your name in the Javadoc comment block for the recommendedActivity() method
(8 points)
MA normally, I ask for you to put your name with on @author tag at the Javadoc comment block
before the class header - but for this lab, put your name in the Javadoc comment block for the
method
Meet the requirements of the problem:
Inside the recommendedActivity() method, using an else-if chain for the determination
of the activity and assigning the value to a String.
The method should only have 1 return statement [see hint below](40 Points)
Trailing else (5 points)
your method should be "neat" with the body of the method indented and the conditionally
executed statements on a separate line and indented [right-click format](16 points)
Following the naming guidelines for Classes and identifiers (8 points)
AAA note: you are not adding any variables and you are not renaming the class
organization of your code (variable declaration first / prompting user for data / calculations if
applicable / then displaying the data)(8 points)
AAA note: since you are writing 1 decision structure, you shouldn't be affecting the organization
unless you gut the method and use multiple returns which is not allowed by me and you'll lose
these points and more above package csit105labch04whichactivityfall24;
/** Class for Lab
To gain experience using an else-if chain with a trailing else
Class
A class, TemperatureBasedActivity, has a partially written method recommendedActivity[) which should
return a String based on the value in the outdoorTemperature field.
To save some time, a "driver" program that tests using a number of values is in Canvas. You only need
to change the recommendedActivity() method in the TemperatureBasedActivity class by adding an if-
else-if chain (with a trailing else) that determines the activity based on the value in the
outdoorTemperature field.
In Canvas on the "In-Class Lab Ch 04( decisions )" assignment is a file
"CSIT105LabCh04WhichActivityFall24.zip" which contains a NetBeans project.
After you download that file, you should be able to run it as is, and you should get this output:
Sample Run without any changes, yet
At -15 degrees I recommend: FIX ME!
At -10 degrees I recommend: EIX ME!
At -5 degrees I recommend: FIX NE!
At 0 degrees I recommend: FIX ME!
At 5 degrees I recommend: FIX ME!
At 10 degrees I recommend: EIX NE!
At 15 degrees I recommend: FIX NE!
At 20 degrees I recommend: FIX NE!
At 25 degrees I recommend: EIX NE!
At 30 degrees I recommend: FIX NE!
At 35 degrees I recommend: FIX NE!
At 40 degrees I recommend: FIX NE!
At 45 degrees I recommend: FIX NE
At 110 degrees I recommend: EIX ME!
Purpose: At 1 1 5 degrees I recommend: EIX ME !

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!