⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mam.java

📁 学生信息管理系统
💻 JAVA
字号:
package homework;
///班级:信计 01-2班     学号:01012218     姓名:武冬生

/**
 * Title:
 * Description:
 * Copyright:    Copyright (c) 2004
 * Company:
 * @author
 * @version 1.0
 */

public class mam implements command
{
  public mam()
  {
  }
  public void execute()
  {
    double max=0,min=100,average=0,sum=0;
    String maxname=new String();
    String minname=new String();
    for(int i=0;i<stulist.size();i++)
    {
      double score=0;
      score+=((stu)stulist.elementAt(i)).getScore();
      sum+=score;
       if(score<min)
       {
        min=score;
        minname=((stu)stulist.elementAt(i)).getName();
        }
        if(score>max)
        {
           max=score;
           maxname=((stu)stulist.elementAt(i)).getName();
        }
    }
    average=sum/(stulist.size());
    System.out.println("The average score:"+average);
    System.out.println("The min score:  "+minname+min);
    System.out.println("The max score:  "+maxname+max);
  }
  public void redo()
  {
  }
  public void undo()
  {
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -