栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

java学生信息管理系统源代码

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

java学生信息管理系统源代码

本文实例为大家分享了java学生信息管理系统的具体代码,实现学生信息: 增加 int[] a=new int[9] 、删除 、查找、更改,供大家参考,具体内容如下

 
import java.util.Scanner;//导入java输入流 
import java.lang.*; 
import java.io.*; 
class Student 
{ 
 private static Student[] s=new Student[2]; 
 int n=0; 
 private String name; 
 private int num; 
 private String classAge; 
 
 public void judge()throws IOException 
 { 
 int i; 
 char ch; 
 String str; 
 Scanner In=new Scanner(System.in); 
 if(n==0) 
 { 
  System.out.print("你还没有录入任何学生,是否录入(Y/N):"); 
  str=In.next(); 
  ch=str.charAt(0); 
  while(ch!='Y'&&ch!='y'&&ch!='N'&&ch!='n') 
  { 
  System.out.print("输入有误,请重新输入:"); 
  str=In.next(); 
  ch=str.charAt(0); 
  } 
  if(ch=='Y'||ch=='y') 
  { 
  this.add(); 
  } 
  if(ch=='N'||ch=='n') 
  { 
  this.menu(); 
  } 
 } 
 } 
 
 public void menu()throws IOException//定义菜单函数 
 { 
 int a;//定义switch语句变量 
 Scanner in=new Scanner(System.in);//实例化输入流对象 
 System.out.println("*********学生信息管理系统功能表*********"); 
 System.out.println("*****  1.增加  *****"); 
 System.out.println("*****  2.显示  *****"); 
 System.out.println("*****  3.修改  *****"); 
 System.out.println("*****  4.删除  *****"); 
 System.out.println("*****  5.查看  *****"); 
 System.out.println("*****  0.退出  *****"); 
 System.out.println("****************************************"); 
 System.out.print("请选择(0~5):"); 
 a=in.nextInt(); 
 while(a<0||a>5) 
 { 
  System.out.print("输入超出范围,请重新输入:"); 
  a=in.nextInt(); 
 } 
 switch(a) 
 { 
  case 1:this.add();break; 
  case 2:this.show();break; 
  case 3:this.modif();break; 
  case 4:this.delete();break; 
  case 5:this.look();break; 
  case 0:System.exit(0);break; 
 }  
 } 
 
 public void add()throws IOException//定义增加函数 
 { 
 String str,str1,str2; 
 int i,num1,t=1; 
 char ch,ch1; 
 FileWriter fw=new FileWriter("F://javaFile//student.txt",true); 
 fw.write("  录入的学生信息列表rnrn学号 姓名 班级rn"); 
 Scanner In=new Scanner(System.in); 
 while(t==1) 
 { 
  System.out.print("请输入学生学号:"); 
  num1=In.nextInt(); 
  for(i=0;i

更多学习资料请关注专题《管理系统开发》。

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持考高分网。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/142023.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号