Answered step by step
Verified Expert Solution
Question
1 Approved Answer
plz help code this problem in java I want the output for top layer only which are coat and sweatshirt. NOT FOR OTHER CLOTHES. Given
plz help code this problem in java I want the output for top layer only which are coat and sweatshirt. NOT FOR OTHER CLOTHES.
Given the weather, time of day, and the activity I have planned to do, help me pick out the correct outfit. I may need to wear layers, so give me the order to dress as well.
Input:
- weather conditions (temperature (int) and sunny/rainy (boolean))
- time of day (morning, mid-day, night (char))
- activity options (bike, eat, hike, bake, read (String)) eat means going out for a meal
Output:
My outfit in order for getting dressed. top layer only.
How I decide what to wear:
- If the temperature is 70 deg. Fahrenheit or above, I wear shorts and a t-shirt, unless I am going out to eat, then I wear a dress.
- If the temperature is below 70 degrees Fahrenheit, I change into long pants and I throw on sweatshirt over my t-shirt. If I am going out to eat, I wrap myself in a shawl.
- I wear a raincoat over my outfit if it is raining.
- I wear a coat if it is below 50 deg. Fahrenheit. and a rain poncho over it only if is raining and it is above 32 deg. Fahrenheit.
- If it is morning or night, and I am reading a book, I am wearing pajamas and slippers
- I only wear socks with gym shoes, and I only wear gym shoes to bike or hike, otherwise I wear flats.
- If I am baking, I tend to be messy, so I put on an apron.
- If I am reading a book mid-day, I read outside and I wear sunglasses, unless it is raining, then, I read inside.
n.b. The boolean data type could be very useful for this one. You will also need the .equals method when actually coding this one.
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