用j**a编写学生管理系统
package com.tree;import j**a.util.arrays;public class studentdemo {private int[] temp;public studentdemo(int[] temp) {th**.temp = temp;}public void printallgrade() {if (temp != **) {for (int i = 0; i < temp.length; i++) {system.out.println("学号 " + (i + 1) + ":" + temp[i]);}} else {system.out.println("参数有误!");}}public void print**arage() {if (temp != **) {arrays.sort(temp);// 排序数据double sum=0.00;for (int i = 0; i < temp.length; i++) {sum+=temp[i];}system.out.println("平均分 :" + sum/temp.length);system.out.println("最高分 :" + temp[temp.length-1]);system.err.println("最低分 :" + temp[0]);} else {system.out.println("参数有误!");}}public void printd**tribution(){if(temp!=**){arrays.sort(temp);// 排序数据stringbuffer a10 = new stringbuffer();//00-09stringbuffer a20 = new stringbuffer();//10-19stringbuffer a30 = new stringbuffer();//20-29stringbuffer a40 = new stringbuffer();//30-39stringbuffer a50 = new stringbuffer();//40-49stringbuffer a60 = new stringbuffer();//50-59stringbuffer a70 = new stringbuffer();//60-69stringbuffer a80 = new stringbuffer();//70-79stringbuffer a90 = new stringbuffer();//80-89stringbuffer a99 = new stringbuffer();//90-99stringbuffer a100 = new stringbuffer();//一百分;for (int i = 0; i < temp.length; i++) {if (temp[i] < 10) {a10.append("*");} else if (temp[i] < 20) {a20.append("*");} else if (temp[i] < 30) {a30.append("*");} else if (temp[i] < 40) {a40.append("*");} else if (temp[i] < 50) {a50.append("*");} else if (temp[i] < 60) {a60.append("*");} else if (temp[i] < 70) {a70.append("*");} else if (temp[i] < 80) {a80.append("*");} else if (temp[i] < 90) {a90.append("*");} else if(temp[i] <100){a100.append("*");}else {a100.append("*");}}system.out.println("00-09: "+a10);system.out.println("10-19: "+a20);system.out.println("20-29: "+a30);system.out.println("30-39: "+a40);system.out.println("40-49: "+a50);system.out.println("50-59: "+a60);system.out.println("60-69: "+a70);system.out.println("70-79: "+a80);system.out.println("80-89: "+a90);system.out.println("90-99: "+a99);system.out.println("100:"+a100);}else{system.out.println("参数有误!");}}public static void main(string[] args) {int[] gradesarray = { 87, 68, 94, 100, 83, 78, 85, 91, 76, 87 };studentdemo s = new studentdemo(gradesarray);s.printallgrade();s.printd**tribution();s.print**arage();}}printmax() 输出学生的最高成绩 和 printmin() 输出学生的最低成绩 我为了方便就直接放到print**arage()里面了,你自己看下就明白;这题太简单了,给分吧; 20210311