Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. There are a minimum of 20 and a maximum of 80 students in a elass. The teacher wonders which student got the highest and
1. There are a minimum of 20 and a maximum of 80 students in a elass. The teacher wonders which student got the highest and which one got the lowest grades as a result of the exam. In your program written in Java, take the number of students in the class as input. Check if the number of students entered is a number from the range {20,80]. If the number is not a number in the range [20,80}, prompt the user to enter a number until it is a number in the range [20,80}. Then read each student's school number and exam grade (grade must be a number in the range : 0 grade 100 ) into two separate arrays. By processing these arrays, display the grades and school numbers of the students with the highest and lowest grades on the screen. (30 p.) Example Output: Enter class size: 15 You entered the wrong number. The number must be in the range [20,80]. Re-enter the class size. Enter class size: 18 You entered the wrong number. The number must be in the range [20,80]. Re-enter the class size. Enter class size: 20 Enter student number and grade: 300176 Enter student number and grade: 300216 Enter student number and grade: 300386 Enter student number and grade: 300496 Enter student number and grade: 302070 Student number 3004 received the highest grade (96). Student number 3002 received the lowest grade (16)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started