1950: Sorting Student objects

内存限制:128 MB 时间限制:1.000 S
评测方式:文本比较 命题人:
提交:19 解决:18

题目描述

define a  School class with three data fields: name,place,foundingYear

define a Student class with three data fields:name,major,grade

the relationship is that a school has many students

输入

here are many cases,for each case,input a school's name ,place and foundingYear,and then input a n to denote the number of the school,the following is n students

输出

Output the school's information,its students informations sorted by grade descending and the average grade of students 

样例输入 复制

smu fujian 2000 
3
lily cs 456
tom iot 500
jimmy designing 560
zju zhejiang 1990
4
lucy cs 656
kate network 700
​bob architecture 610
alice music 620

样例输出 复制

smu, located in fujian and founded in 2000, its students:
jimmy designing 560
tom iot 500
lily cs 456
the average grade is 505.3
zju, located in zhejiang and founded in 1990, its students:
kate network 700
lucy cs 656
alice music 620
​bob architecture 610
the average grade is 646.5