Question: a) Illustrating your answer using the buggy code below, explain in your own words what it means for variables to be defined as locally as

a) Illustrating your answer using the buggy code below, explain in your own words what it means for variables to be defined as locally as possible, and why it is important. This code is intended to print one of two messages depending on whether an integer input is less than a secret number or not. The function, inputint, correctly prints the given String and then returns a number input by the user. public static void game (int secret) { int score inputInt("Give me a number"); if (score
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
