1969: Object array sorting
内存限制:128 MB
时间限制:1.000 S
评测方式:文本比较
命题人:
提交:14
解决:3
题目描述
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 ascending,the total grade 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:
lily cs 456
tom iot 500
jimmy designing 560
the total grade is 1516,the average grade is 505.3
zju, located in zhejiang and founded in 1990, its students:
BOB architecture 610
alice music 620
lucy cs 656
kate network 700
the total grade is 2586,the average grade is 646.5