### Exercise 3: Conditional Statements

Copy your solution to Exercise 2 from exercises/ex2 to exercises/ex3 in your repository.

Compile Spheroid.java, run the program, and observe its behaviour when invalid numeric inputs are supplied – i.e., value of zero for either radius, negative value for either radius, value of $$c$$ greater than value of $$a$$. (You don’t need to consider non-numeric inputs here.)

Edit Spheroid.java and modify it so that it

• Displays the message “Error: equatorial radius must be larger than 0” when $$a \leqslant 0$$
• Displays the message “Error: polar radius must be larger than 0” when $$c \leqslant 0$$
• Displays the message “Error: equatorial radius must be larger than polar radius” when $$c > a$$
• Computes and displays eccentricity and volume only when both $$a$$ and $$c$$ are valid

See Section 3.5 of Eck’s book if you need guidance on what is required here.

Go to Submit My WorkExercises 1-5Exercise 3 in Minerva to submit your solution for grading. You can improve your solution and resubmit as many times as you like until the deadline. Also, don’t forget to commit your work to your Git repository and push those commits up to GitLab.

##### Tips
• You can use System.exit() to exit a program prematurely, before the end of main. This method expects an integer status code, and by convention a non-zero status is used to indicate that the program did not execute successfully.