Question: Question 6 ( Programming problem ) : Problem Name: Find the minimum and maximum CGPA Problem: XXXXX number of students have enrolled in Fall 2
Question Programming problem:
Problem Name: Find the minimum and maximum CGPA
Problem: XXXXX number of students have enrolled in Fall 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:
CGPA is DOUBLE, and CGPA
N and N
Students have a unique CGPA no student can have the same CGPA
Each student's name and CGPA will be read as a line
You must have to use CLASS as the primary data structure
Output:
Maximum and minimum CGPA and the student's name
Program execution time
Hints: Java Class, Method calling, Sequential searching
Test input :
Number of Students:
Alice
Bob
Madison
Alex
Marvin
Test output:
Marvin
Bob
Test input :
Number of Students:
Alice
Bob
Tom
Marjory
Calvin
Test output:
Marjory
Tom
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
