Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write an application that displays a series of at least five student ID numbers

ID: 3655963 • Letter: W

Question

Write an application that displays a series of at least five student ID numbers (that you have stored in an array) and asks the user to enter a numeric test score for the student. Create a ScoreException class, and throw a ScoreException for the class if the user does not enter a valid score (less than or equal to 100). Catch the ScoreException and then display an appropriate message. In addition, store a 0 for the student's score. At the end of the application, display all the student IDs and scores. Save the files as ScoreException.java and TestScore.java.

Explanation / Answer

[ view sourceprint? public class testScore throws Exception{ private int testScore; public void setTestScore(String input){ try{ int i = Integer.parseInt(input); if (i100) throw new Exception("wrong input blah blah"); }catch(Exception e){ throw new Exception("wrong input blah blah"); } } }
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote