Your assignment is to create a method, weatherAttire, that recommends what type of jacket to wear, whether to bring an umbrella, and whether to wear snow boots. The method takes two parameters: a double representing the temperature, and a boolean representing whether rain is in the forecast for that day. The method does not return a value. The following rules govern the recommendations: Temperature If the temperature is greater than 50 degrees, output “Do not wear a jacket.” If the temperature is between 32 and 50 degrees, inclusive, output “Wear a light jacket.” Otherwise, output “Wear a heavy jacket.” Rain If there is rain in the forecast, output “Bring an umbrella.” If there is rain in the forecast and the temperature is below 32 degrees, also output “Wear snow boots.” Otherwise, output “Do not bring an umbrella.” Use, but do not modify, the following main() method: public static void main(String[] args) { Scanner scnr = new Scanner(System.in); weatherAttire(51, true); weatherAttire(30, true); weatherAttire(40, false); } Your code should produce the following output in response to the three method calls: Do not wear a jacket. Bring an umbrella. Wear a heavy jacket. Bring an umbrella. Wear snow boots. Wear a light jacket. Do not bring an umbrella. Upload your entire .java file to the box when you are done. Rubric: Program compiles and runs without throwing exceptions or entering an infinite loop (5pt) Declare method weatherAttire() with correct type of return value (5pt) Declare method weatherAttire() with correct number and type(s) of parameter variables (5pt) Correctly recommend attire based on temperature and rain forecast (10pt)
Blog
In general, sympathetic preganglionic fibers are ________ a…
In general, sympathetic preganglionic fibers are ________ and postganglionic fibers are ________.
Criminal Investigations Quiz. 11.7.24.doc
Criminal Investigations Quiz. 11.7.24.doc
The actions of this muscle include elevation and __________…
The actions of this muscle include elevation and __________ of the mandible.
How does a Bid Bond protect the owner during the bidding pro…
How does a Bid Bond protect the owner during the bidding process? Explain using the following bid data: Lowest Bid: 100,000 Second Lowest Bid: 105,000 Third Lowest Bid: 115,000
Use the following information to answer the next four questi…
Use the following information to answer the next four questions A manufacturer orders ball bearings from a supplier. The manufacturer uses 12,000 of the ball bearings each year and pays the supplier $1.75 per ball bearing. Each time the supplier ships ball bearings to the manufacturer there is a fixed order cost of $250.00, and the manufacturer estimates their annual holding cost to be 40% of the cost per ball bearing.
C&A Vitamins sells 600 bottles of a dietary supplement per w…
C&A Vitamins sells 600 bottles of a dietary supplement per week at $100 per bottle. The supplement is ordered from a supplier who charges C&A $30 per order and $50 per bottle. C&A’s annual holding cost percentage is 40%. Assume C&A Vitamins operates 50 weeks in a year. What is C&A’s total ordering and holding cost per year if the order quantity is 200?
Biofeedback is an instrument to bring awareness of muscular…
Biofeedback is an instrument to bring awareness of muscular neural recruitment.
I am required to read all of the information in the Honorloc…
I am required to read all of the information in the Honorlock Module on Canvas before taking the exam.
You step on a sharp tack and a reflex occurs which causes yo…
You step on a sharp tack and a reflex occurs which causes you to withdraw your foot from the tack and at the same time straighten your uninjured leg to support the transfer of weight. What do we call this response?