学生成绩管理系统_第1页
学生成绩管理系统_第2页
学生成绩管理系统_第3页
学生成绩管理系统_第4页
学生成绩管理系统_第5页
已阅读5页,还剩1页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、package 学生成绩管理系统;import java.util.*;public class StudentMarkManagepublic static int Max=50;public static String student_ID=new StringMax;public static String name=new StringMax;public static String sex=new StringMax;public static double mark=new doubleMax;public static int cout=0;/ 学生的人数public stati

2、c String stuID;/public static int i=0;public static double modifymark=0;public static int select_number=0;private static boolean p;public static void AddStudent() Scanner read=new Scanner(System.in);if(cout>=Max) System.out.println(" 数组已满 ,不能增加人数 ");return;t:while(true)System.out.print(

3、" 请输入学生的学号:");try student_IDcout=read.nextLine();break;catch(Exception e)System.out.println(" 你输入的学号有误,程序将返回功能菜单");continue t; System.out.print(" 请输入学生名字:");try namecout=read.nextLine();catch(Exception e) System.out.print(" 请输入学生性别 :"); try sexcout=read.nextLi

4、ne(); catch(Exception e) System.out.print(" 请输入学生的成绩:");try markcout=Double.parseDouble(read.nextLine(); catch(Exception e) System.out.println(" 输入错误 ,新增失败,程序将返回功能菜单");return; public static void ModifyMark() int i;Scanner read=new Scanner(System.in); t:while(true) System.out.prin

5、tln(" 请输入学生的学号:");try stuID=read.nextLine(); break; catch(Exception e) System.out.println(" 输入错误 ,程序将返回功能菜单");continue t; for(i=0;i<cout;i+) if(student_IDi.equals(stuID) break; if(i>=cout) System.out.println(" 你输入的学生的学号不存在");return;/退出 switch 语句System.out.print(&q

6、uot; 请输入学生的新成绩:");trymodifymark=Double.parseDouble(read.nextLine();catch(Exception e)System.out.println(" 输入错误 ,程序将返回功能菜单");return;marki=modifymark;public static void DeleteStudent()int i;Scanner read=new Scanner(System.in);t:while(true)System.out.print(" 请输入你要删除的学生的学号:");tr

7、ystuID=read.nextLine();break;catch(Exception e)能");System.out.println(" 你输入的要删除的学生的学号不存在,程序将返回菜单功continue t;for(i=0;i<cout;i+)if(student_IDi.equals(stuID)break;if(i>=cout)System.out.println(" 你输入的学生学号不存在 "); return; for(int j=i;j<cout;j+) student_IDj=student_IDj+1;namej=

8、namej+1;sexj=sexj+1;markj=markj+1;/数组最后一个记录要删除student_IDcout-1=""namecout-1=""sexcout-1=""markcout-1=0;public static void SearchStudent()int i;Scanner read=new Scanner(System.in);t:while(true) System.out.print(" 请输入你要查询的学生的学号:");try stuID=read.nextLine(); brea

9、k;catch(Exception e) System.out.println(" 你输入的学生的学号不存在,程序将返回菜单功能");continue t; for(i=0;i<cout;i+)if(student_IDi.equals(stuID) System.out.println(" 学 号 :"+student_IDi+" 姓 名 :"+namei+" 性 别 :"+sexi+" 成绩 :"+marki);return;if(i>=cout) System.out.prin

10、tln(" 你输入的学生的学号不存在,程序将返回菜单功能");return; public static void PrintMark() int i;if(cout=0)System.out.println("no one student");for(i=0;i<cout;i+)System.out.println(" 学 号 :"+student_IDi+" 名 字 :"+namei+" 性 别 :"+sexi+" 成绩 :"+marki);public stati

11、c void ExitSystem() System.out.println(" 你选择的功能是退出,再见");public static int select_menu() Scanner read=new Scanner(System.in);p:while(true) t:while(true) System.out.println("|*|");学生成绩管理系统System.out.println("|*|"V1.增加学生|);System.out.println("|*2.修改成绩|)|);System.out.p

12、rintln("|*|"V3.删除学生|);System.out.println("|*|"V4.查询成绩|);System.out.println("|*|"V5.打印成绩|);System.out.println("|*6.退出系统System.out.print("请输入你要选择的数字:");tryselect_number=Integer.parseInt(read.nextLine(); break;catch(Exception e)System.out.println(" 输入错误 ");continue t;if(select_number<1|select_number>6)System.out.println(" 你输入的数字有误,请再一次的输入");continue p;break;return select_number;public static void main(String args)t:while(true)switch(selec

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论