Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a flowchart with the following shapes for the below Java program. import java.util.Scanner; public class Exercise 0 7 _ 0 1 { public static

Create a flowchart with the following shapes for the below Java program.
import java.util.Scanner;
public class Exercise07_01{
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int numberOfStudents;
int[] scores;
int bestScore = Integer.MIN_VALUE;
System.out.print("Enter the number of students: ");
numberOfStudents = scanner.nextInt();
scores = new int[numberOfStudents];
System.out.print("Enter "+ numberOfStudents +" scores: ");
for (int i =0; i numberOfStudents; i++){
scores[i]= scanner.nextInt();
if (scores[i]> bestScore){
bestScore = scores[i];
}
}
System.out.println("Grades:");
for (int i =0; i numberOfStudents; i++){
char grade;
if (scores[i]>= bestScore -10){
grade ='A';
} else if (scores[i]>= bestScore -20){
grade ='B';
} else if (scores[i]>= bestScore -30){
grade ='C';
} else if (scores[i]>= bestScore -40){
grade ='D';
} else {
grade ='F';
}
System.out.println("Student "+ i +" score is "+ scores[i]+" and grade is "+ grade);
}
}
}
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases With Application To GIS

Authors: Philippe Rigaux, Michel Scholl, Agnès Voisard

1st Edition

1558605886, 978-1558605886

More Books

Students also viewed these Databases questions

Question

What do Dimensions represent in OLAP Cubes?

Answered: 1 week ago