A person is confronted by a dangerous dog. His heart begins to race and beat strongly, his pupils dilate, and his hairs stand up. These signs are the result of:
You can earn up to 5 points of extra credit by successfully…
You can earn up to 5 points of extra credit by successfully completing this question. A student in IST 140 is trying to write a method, caughtSpeeding(), and to call that method from the main() method. You’re a tutor who is helping the student to find the errors in his code and to correct them. The instructions the student received were as follows: You are driving a little too fast, and a police officer stops you. Write code to compute the result, encoded as an int value: 0: no ticket 1: small ticket 2: big ticket. The int values are determined as follows: If speed is 60 or less, the result is 0. If speed is between 61 and 80 inclusive, the result is 1. If speed is 81 or more, the result is 2. For all of the above, if it is the driver’s birthday, then the speed can be 5 higher in all cases. Your method should have the name caughtSpeeding, and should have parameters for speed and for whether it is the driver’s birthday. Call the caughtSpeeding() method from main(), and print the resulting return value (i.e., do not use System.out.println() from within the caughtSpeeding() method). Example 1: In the main() method, the statement: System.out.println(caughtSpeeding(90, false)); Should result in the output: 2 Example 2: In the main() method, the statement: System.out.println(caughtSpeeding(65, true)); Should result in the output: 0 The student’s code, which is not correct, is as follows: public class Main { public static boolean caughtSpeeding(int speed, boolean isBirthday, int ticketPrice) { if (isBirthday) { speed += 5; } if (speed >= 81) { return 2; } if (speed >= 61) { return 1; } else { return 0; } } public static void main(String[] args) { System.out.println(caughtSpeeding(90, false)); System.out.println(caughtSpeeding(65, true)); } } Correct the students’ code so that it runs correctly. You do not need to, and should not, make any changes to the main() method. Instead, copy the entire code block above, paste it into IntelliJ, and make the necessary changes to the caughtSpeeding() method. Then paste your entire corrected .java file into this box. Rubric: Program compiles and runs without throwing exceptions or entering an infinite loop (1pt) Declare method caughtSpeeding() with correct type of return value (1pt) Declare method caughtSpeeding() with correct number and type(s) of parameter variables (1pt) Correct output based on call to caughtSpeeding() (2pts)
Digestion of proteins begins in the _____ where _____ and __…
Digestion of proteins begins in the _____ where _____ and _____, mix with the food to break down protein into _____.
The insertion of this muscle is the __________ of the scapul…
The insertion of this muscle is the __________ of the scapula.
The insertions of this muscle includes the lateral third of…
The insertions of this muscle includes the lateral third of the clavicle, the acromion process and __________ of the scapula.
Which of these phases begins with the anticipation of eating…
Which of these phases begins with the anticipation of eating—the smell of a juicy burger being cooked, for example?
Which of the following areas receives acidic chyme, digestiv…
Which of the following areas receives acidic chyme, digestive enzymes and bicarbonate, as well as bile?
The origin of this muscle includes the __________ __________…
The origin of this muscle includes the __________ __________ of C1-C4.
Which of the following is the amount of air you can forceful…
Which of the following is the amount of air you can forcefully inhale beyond a regular inhalation?
Which of the following is known as quiet breathing (normal i…
Which of the following is known as quiet breathing (normal inspiration and normal expiration)?