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 degrees I recommend: EIX ME
At degrees I recommend: FIX NE
At degrees I recommend: FIX NE
At degrees I recommend: FIX NE
At degrees I recommend: FIX NE
At degrees I recommend: FIX NE
At B 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 distinct activities, but your text describing
the activities can be slightly different keep it clean!
Sample Run after fixing the recommendedActivity method
At degrees I recommend: Checkers
At degrees I recommend: Checkers
At degrees I recommend: Checkers
At degrees I recommend: Checkers
At degrees I recommend: Checkers
At degrees I recommend: Checkers
@t degrees I recommend: Skiing
@t degrees I recommend: Skiing
At degrees I recommend: Skiing
At degrees I recommend: Skiing
At degrees I recommend: Golf
Mt degrees I recommend: Golf
At degrees I recommend: Golf
At degrees I recommend: Golf
At degrees I recommend: Tennis
@t degrees I recommend: Tennis
@t degrees I recommend: Tennis
At degrees I recommend: Tennis
At degrees I recommend: Tennis
@t degrees I recommend: Tennis
At degrees I recommend: Swimming
At degrees I recommend: Swimming
At degrees I recommend: Swimming
At degrees I recommend: Swimming
At degrees I recommend: Move north
At degrees I recommend: Move north
At degrees I recommend: Move north
@t degrees I recommend: Skiing
At degrees I recommend: Skiing
At degrees I recommend: Skiing
At degrees I recommend: Golf
At degrees I recommend: Tennis
At l degrees I recommend: Swimming Grading Rubric
Include your name in the Javadoc comment block for the recommendedActivity method
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 elseif chain for the determination
of the activity and assigning the value to a String.
The method should only have return statement see hint below Points
Trailing else points
your method should be "neat" with the body of the method indented and the conditionally
executed statements on a separate line and indented rightclick format points
Following the naming guidelines for Classes and identifiers 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 points
AAA note: since you are writing 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 csitlabchwhichactivityfall;
Class for Lab
To gain experience using an elseif 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
elseif chain with a trailing else that determines the activity based on the value in the
outdoorTemperature field.
In Canvas on the InClass Lab Ch decisions assignment is a file
"CSITLabChWhichActivityFallzip" 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 degrees I recommend: FIX ME
At degrees I recommend: EIX ME
At degrees I recommend: FIX NE
At degrees I recommend: FIX ME
At degrees I recommend: FIX ME
At degrees I recommend: EIX NE
At degrees I recommend: FIX NE
At degrees I recommend: FIX NE
At degrees I recommend: EIX NE
At degrees I recommend: FIX NE
At degrees I recommend: FIX NE
At degrees I recommend: FIX NE
At degrees I recommend: FIX NE
At degrees I recommend: EIX ME
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
