TODO3 - Use if/else statements nested inside of if/else statements to determine and return the largest of 3 integers
"public int max(int a,int b, int c)"
   
- Complete the lab section first for practice with Space Smasher before moving on to the assignment.
- Remember to experiment with your game by enabling and disabling the solution to observe the desired behaviour (see the Stepwise Approach below).
- Find the TODO3.java starter file; run the empty solution file and explore the behaviour that you will replicate with your code.
- Next, read all of the comments at the top of the file in the file header.
- Determine the single function you need to declare inside the empty class. It's described in the comments and also at the top of this webpage.
- Declare the function "public int max(int a,int b, int c){return -1;}" and leave it empty and rerun the game - do you notice any incorrect behaviour on the console ?
- If you define the function above and leave it with "return -1", you should see incorrectly reported high scores in the console output.
- If you can still observe correct console output for scores with your recently added function, make sure you named the function exactly as indicated, with correct spelling, capitialization, and keywords like "public" and "void".
- You can put the "@Override" statement directly above your declared method - this will help you discover syntax or typing errors.
- Inside your method, you must build one if/else statement that asks: "if a is greater than or equal to b"
- Inside the body of the if you just wrote, you should nest another if/else statement that asks: "if a is greater than or equal to c, return a, else return c"
- Extend the outermost if/else statement by adding an else/if clause that asks:" else if b is greater than or equal to a"
- Inside the body of the else/if you just wrote, you should nest another if/else statement that asks: "if b is greater than or equal to c, return b, else return c"
- Extend the outermost if/else statement one last time to consider the case that c is the greatest using an else/if clause.
- And, inside the body of the else/if you just wrote, you should nest another if/else statement that asks about c and returns the correct (maximum) value.
- Note that you need no API calls to accomplish this, and should not use Math.max() either.
- This is the only function that takes input and provides output in this assignment
- Solution Enabled: The output on the console correctly reports the largest of three scores, as pictured below.
- Solution Disabled: The output on the console incorrectly reports the largest of three nonnegative integers as -1, seen in the image below.

The image above correctly determines the largest of three scores.
The image below incorrectly determines the largest of three scores as -1.
