Question: Question 6 ( Programming problem ) : Problem Name: Find the minimum and maximum CGPA Problem: XXXXX number of students have enrolled in Fall 2

Question 6(Programming problem):
Problem Name: Find the minimum and maximum CGPA
Problem: XXXXX number of students have enrolled in Fall 2023 in the various departments at YYYY
State University. Each student has some information stored in the database, such as the student's name and
CGPA. Now, the campus wants to present an award to the students with the highest CGPA. The campus
also wants to reduce the number of dropout students and wants to know about the students with the lowest
CGPA. As a computer science student, you are tasked with developing an algorithm that finds out the
student with the maximum CGPA and the minimum CGPA. The algorithm takes the student number (N),
and each student's information as input and finds out the maximum and minimum CGPA and the
corresponding students.
Input characteristics:
1. CGPA is DOUBLE, and CGPA >0
2. N>1 and N<=10000
3. Students have a unique CGPA (no student can have the same CGPA)
4. Each student's name and CGPA will be read as a line
5. You must have to use CLASS as the primary data structure
Output:
1. Maximum and minimum CGPA and the student's name
2. Program execution time
Hints: Java Class, Method calling, Sequential searching
Test input 1:
Number of Students: 5
Alice 3.5
Bob 3.0
Madison 3.8
Alex 3.3
Marvin 3.9
Test output:
3.9 Marvin
3.0 Bob
Test input 2:
Number of Students: 3
Alice 3.1
Bob 3.3
Tom 2.8
Marjory 3.8
Calvin 3.5
Test output:
3.8 Marjory
2.8 Tom

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!