DenislavPetkov 0 Точки

Tech Module Java // 07. Student Academy

Здравейте може ли помощ за 07. Student Academy https://pastebin.com/0jgDAg00 накрая немога да го измисля как да ги сортирам descending по average grade?

You will receive n pair of rows. First you will receive the student's name, after that you will receive his grade. Check if student already exists, and if not, add him. Keep track of all grades for each student.

When you finish reading data, keep students with average grade higher or equal to 4.50. Order filtered students by average grade in descending.

Print the students and their average grade in format:

Format the average grade to the 2nd decimal place.

Examples

 Input Output Input Output 5 John 5.5 John 4.5 Alice 6 Alice 3 George 5 John -> 5.00 George -> 5.00 Alice -> 4.50 5 Amanda 3.5 Amanda 4 Rob 5.5 Christian 5 Robert 6 Robert -> 6.00 Rob -> 5.50 Christian -> 5.00
Тагове:
0
Elvir 6 Точки

https://pastebin.com/zUDUzNCS

ето едно примерно решение.

0
svetlakrasteva 7 Точки

Аз ти благодаря, защото със сортировките малко съм скарана, но твоето решение го разбирам.

Кода на предишния колега е много advanced за мен.

0