Please can I get a flowchart and pseudocode for this java code. Thank you. TestScore.java import java.util.Scanner; ;//import Scanner to take input from user public class TestScore {    @SuppressWarnings("resource")    public static void main(String[] args) throws ScoreException {//main method may throw Score exception        int [] arr = new int [5]; //creating an integer array for student id        arr[0] = 20025; //assigning id for each student        arr[1] = 20026;        arr[2] = 20027;        arr[3] = 20031;        arr[4] = 20024;        int [] stuScore = new int[arr.length]; //Creating an array of stuScore to store each stu score        Scanner sc = new Scanner (System.in); //Initializing Scanner input        for (int i = 0; i < arr.length; i++) {//iterating through each student        System.out.print("enter score for stu id " + arr[i] + ":");//prompting user to enter score        try {        stuScore[i] = sc.nextInt();//taking user input        if (stuScore[i] <= 0) {//if student score is less than or equal to 0        //throwing Score exception        throw new ScoreException(        "Score cannot be negative, so we are assigning 0 by default to your score");        }        } catch (ScoreException e) {        System.out.println(e.getMessage());//print only the message        stuScore[i] = 0; //assign the value to 0        }        }        for (int i = 0; i < arr.length; i++) {        System.out.println("stu id =" + arr[i] + " score for stu:" + stuScore[i]); //printing stu id and their corresponding score        }        }    }     ScoreException.java public class ScoreException extends Exception {    ScoreException (String s) {        super(s);   } }

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

Please can I get a flowchart and pseudocode for this java code. Thank you.

TestScore.java

import java.util.Scanner; ;//import Scanner to take input from user
public class TestScore {

   @SuppressWarnings("resource")
   public static void main(String[] args) throws ScoreException {//main method may throw Score exception
       int [] arr = new int [5]; //creating an integer array for student id
       arr[0] = 20025; //assigning id for each student
       arr[1] = 20026;
       arr[2] = 20027;
       arr[3] = 20031;
       arr[4] = 20024;
       int [] stuScore = new int[arr.length]; //Creating an array of stuScore to store each stu score
       Scanner sc = new Scanner (System.in); //Initializing Scanner input
       for (int i = 0; i < arr.length; i++) {//iterating through each student
       System.out.print("enter score for stu id " + arr[i] + ":");//prompting user to enter score
       try {
       stuScore[i] = sc.nextInt();//taking user input
       if (stuScore[i] <= 0) {//if student score is less than or equal to 0
       //throwing Score exception
       throw new ScoreException(
       "Score cannot be negative, so we are assigning 0 by default to your score");
       }
       }

catch (ScoreException e) {
       System.out.println(e.getMessage());//print only the message

       stuScore[i] = 0; //assign the value to 0
       }
       }
       for (int i = 0; i < arr.length; i++) {
       System.out.println("stu id =" + arr[i] + " score for stu:" + stuScore[i]); //printing stu id and their corresponding score

       }
       }
   }

 

 

ScoreException.java
public class ScoreException extends Exception {

   ScoreException (String s) {
       super(s);
  }
}

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education