Part I: Student Grade Alert (20 points) In this part, you will write a function
ID: 3727739 • Letter: P
Question
Part I: Student Grade Alert (20 points) In this part, you will write a function student-alert ). The function simulates a simplified student grade alert system, which will evaluate a list of students' grades, and return their corresponding "alert level" (more on this later). The function takes only one argument, students, which is a list of lists. Each sub-list contains one particular student's grades in the form of letter grade strings. Each letter grade has a corresponding integer value as shown below: Letter Grade Corresponding Value 95 85 75 65 Example list: ['A', 'B','A'F,'B'1, ['A', '',I,'C,'D,A','A',['F,'F'Explanation / Answer
public List<Character> student_alert(List<List<Character>> gradeList){
List<Character> retValue = new ArrayList<>();
List<Integer> values = new ArrayList<>();
Map<Character,Integer> map= new HashMap<>();
map.put('A',95); map.put('B',85); map.put('C',75); map.put('D',65); map.put('E',55);
av=sum/values.size();
if(av<70)
retValue.add('R');
else if(av>=70 && av<80)
retValue.add('Y');
else
retValue.add('G');
return retValue;
}
}