Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write in java pdf . switch for loop any other material learned previously this semester except javafx Instructions Write a program that does the following

Write in java image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
pdf . switch for loop any other material learned previously this semester except javafx Instructions Write a program that does the following 1) Open the file provided to you on Moodle. This file has a series of temperatures. 2) Loop through the file with a while loop read in a line Loop through the line with a for loop to look at one character at a time i) Hint: we covered this in class last week with substring method Use a switch statement to count a) b) c) i) how many e a n o", and "s" letters there are (1) Note this is one number. Don't' count for each letter how many other letters there are as a single count il) When you have read all the lines in the file output a) How many "e". t, "a", ", "n. "o", and "s" letters there are b) How many other letters there are BONUS 10 Points a) 3) 4) In addition to the information about, output each number as a percent of the overall, formatted 5) Example Output The number of e, t, a, i, n, p, s letters are: 4915 and the number of other letters are: 5058 The % of e, t. a, i, r, p, s letters is: 49.3% and the % of other letters is: 50.7% CSi 2300, Dinsmoor Page 1 of 1 /3/2019 File Edit Format View Help have a confession to make but first i want you to make a little confession to me n the past year i want you to just raise your hand if youve experienced relatively little stress how about a moderate amount of stress who has experienced a lot of stress yeah me too but that is not my confession my confession is this am a health psychologist and my mission is to help people be happier and healthier but i fear that something ive been teaching for the last 10 years is doing more harm than good and it has to do with stress for years ive been telling people stress makes you sick it increases the risk of everything from the common cold to cardiovascular disease basically ive turned stress into the enemy but i have changed my mind about stress and today i want to change yours let me start with the study that made me rethink my whole approach to stress this study tracked 30 0e0 adults in the united states for eight years and they started by asking people how much stress have you experienced in the last year " they also asked do you believe that stress is harmful for your health and then they used public death records to find out who die okay some bad news first people who experienced a lot of stress in the previous year had a 43 percent increased risk of dying but that was only true for the people who also believed that stress is haraful for your health people who experienced a lot of stress but did not view stress as haraful were no more likely to die in fact they had the lowest risk of dying of anyone in the study including people who had relatively little stress now the researchers estimated that over the eight years they were tracking deaths 182 880 americans died prematurely not from stress but from the belief that stress is bad for you that is over 28 000 deaths a year if that estimate is correct that would make believing stress is bad for you the 15th largest cause of death in the united states last year killing more people than skin cancer hiv aids and homicide you can see why this study freaked me out here ive been spending so much energy telling people stress is bad for your health so this study got me wondering can changing how you think about stress make you healthien and here the science says yes when you change your mind about stress you can change your bodys response to stress ie Edit Format View Help ou to explain how this works , want you all to pretend that you are participants in a study designed to stress you out its called the social stress test you come into the laboratory and youre told you have to give a five-minute inpronptu speech on your personal weaknesses to a panel of expert evaluators sitting right in front of you and to make sure you feel the pressure there are bright lights and a canera in your face kind of ike this and the evaluators have been trained to glye you discouraging on-verbal feedback like this now that youre sufficiently demoralized tine for part two math test nd unbeknownst to you the experimenter has been trained to harass you during it ow were going to all do this together its going to be fun kay fron ant you all to count backowards in increments of severn youre going to do this out loud as fast as you can tarting with 8o go faster faster please youre going too sLou stop stop stop top hat guy made a mistake e are going to have to start all over agaim youre not very good at this are you ekay so you get the idea If you were actually in this study youd probably be a little stressed out your heart might be pounding you might be breathleg faster syte breaking and normally intosweat e interpret these physlcal changes as anxlety or sigms that we anent coping but what if you viewed thew instead as signs that your body was energi was preparing you to seet this challengs nou that is exactly what participants were told in a study conducted at before they went through the social stress test universit hey were taught to rethink their stress response as helpfu that pounding heart is preparing you for actlon youre breathng Faster File Edit Format View Help its no probl its getting more oxygen to your brain and participants who learned to view the stress response as helpful for their performance well they were less stressed out less anxious more confident but the most fascinating finding to me was how their physical stress response changed in a typical stress response your heart rate goes up and your blood vessels constrict like this and this is one of the reasons that chronic stress is sometimes associated with cardiovascular disease its not really healthy to be in this state all the time but in the study hen participants viewed their stress response as helpful their blood vessels stayed relaxed 1like this heir heart was still pounding but this is a much healthier cardiovascular profile it actually looks a lot like what happens In moments of joy and courage ver a lifetime of stressful experiences this one biological change could be the difference between a stress-induced heart attack at age 5e and iving wen into your es and this is really what the new science of stress reveals that how you think about stress matters so my goal as a health psychologist has changed no longer want to get rid of your stress want to make you better at stress and we just did a little intervention If you raised your hand and sald youd had a lot of stress in the last year we could have saved your life because hopefully the next time your heart is poundlng from stress youre going to reneaber this talk and youre going to think to yourself this is ay body helping me rise to this challenge and when you view stress in that way your body believes you and your stress response becones healthier now i said i have over a decade of demonizing stress to redees ayself frm so we are going to do one more intervention i want to tell you about one of the most under -apprectated aspects of the stress response and the idea is this stress makes you social to understand this side of stress we need to talk about a horsone oxytocin and s know axytocin has already gotten as much hype as a horone can get it even has its own cute nicknane the cuddle hormone because its released shen you hug soncone but this is a very snall part of what oxytocin is involved in oxytocin is a neuro-hormone it fine-tunes your brains social instincts t prines you to do things that strengthen close relatlonships oxytocin makes you crave physical contact with your friends and family it enhances your empathy

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions

Question

(a) all strings with exactly one a

Answered: 1 week ago

Question

1. Identify three approaches to culture.

Answered: 1 week ago

Question

2. Define communication.

Answered: 1 week ago