当前位置:首页 » 编程语言 » java教学管理系统

java教学管理系统

发布时间: 2022-05-19 18:23:54

‘壹’ 用java做个管理系统应该怎么做

看一下JDBC相关的API。
然后就是把所有JAVA代码嵌入到JSP中来写,这样是最省事的。
也可以使用servlet+JSP来写,不过相对的就要多学一点知识。
不过这种只能算是初级一些的
现在流行SSH框架 ,你也可以学习进行应用。
恩最基本的代码,你可以去借一些实例书,参考的做一个,这样也比较速成。
既然你有java基础看懂一些也不是很困难,边做边学边思考你上手不会很难

‘贰’ Java:做一个学生管理系统要做些什么啊

下面是我前不久做的一个系统,你可以参考一下:

课程管理系统确认项目系统建设方案

2008年4月21日星期一
1. 项目背景
随着高校信息化的发展,不论是老师还是学生都有课程上网的需求。课程上网后。一方面会有利于学生经常反复阅读教学计划和教学内容,更好地领会老师教学设计的用意,在一定程度上减轻学生记笔记和听课不能兼顾的问题,另一方面也有利于老师对网上课程内容的不断更新,便于老师改进教学,同时因为课程管理系统提供了方便的教学管理工具,老师教学的效率会大大提高。
2. 功能模块
�8�5 操作员管理
只有系统管理员可以添加操作员,添加成功后便可以访问课程管理系统。添加的操作员具有不同的角色,分为教师与学生两种。
�8�5 课程管理
教师特有权限,可以在互连网上直接对课程进行相应增、删、改操作。
�8�5 学生成绩信息管理
教师特有权限,可以在互连网上直接对学生成绩信息进行相应增、删、改操作。
�8�5 学生成绩查询
学生登录后只能查询自己的成绩信息。

3. 系统特色
�8�5 技术的先进性
采用B/S(JAVA)技术架构、大型sql数据库技术使得系统在技术上处于绝对领先地位。
�8�5 完善的网络化管理策略
系统充分利用局域网和Intranet的网络化优势,使得学校各教学岗位的教师对学生的管理实现网络化,学生也可通过网络得到与自己相关各项数据。
4. 方案设计
�8�5 软件架构设计
本方案采用MVC三层架构,用户使用浏览器以WEB方式使用系统的各个功能;业务层提供系统的各项功能与服务,包括操作员管理、课程管理、学生成绩信息管理与学生成绩查询;业务层使用持久层组件来实现系统的各种业务数据的持久化。EIS层提供了数据的保存等工作。
�8�5 业务概述
系统管理员添加操作员成功以后,此操作员便可以登陆课程管理系统网站进行相应操作。此时系统将判断登陆的操作员角色,如果为教师,那么他能够对课程信息做相应增、删、改操作。还可以对学生课程信息进行相应增、删、改操作。如果为学生,那么他只能够查询自己的课程成绩信息。
�8�5 关键技术
1) Struts框架:完美的MVC实现,便于日后系统的扩展。
2) Hibernate持久层框架:使用Hibernate技术实现系统数据持久化,同时简化了数据的操作,使业务逻辑更加清晰。

‘叁’ java学生管理系统

import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.lang.*;

public class Students extends Applet implements ActionListener
{
Vector StuInf=new Vector();
StudentInf SI;
String xm;
String bj;
int i,j,xh,cj;
static int mid;
Label prompt1=new Label("学生成绩管理系统");
Label prompt2=new Label(" 用户:");
Label prompt3=new Label(" 密码:");
Label prompt4=new Label(" 班级:");
Label prompt5=new Label(" 成绩:");
TextField input1=new TextField(8);
TextField input2=new TextField(8);
TextField input3=new TextField(8);
TextField input4=new TextField(8);
Button btn1=new Button("登录");
Button btn2=new Button("增加");
Button btn3=new Button("修改");
Button btn4=new Button("删除");

public void init()
{
setLayout(new GridLayout(6,3));
add(new Label());
add(prompt1);
add(new Label());
add(prompt2);
add(input1);
add(new Label());
add(prompt3);
add(input2);
add(btn1);
add(prompt4);
add(input3);
add(new Label());
add(prompt5);
add(input4);
add(new Label());
add(btn2);
add(btn3);
add(btn4);
prompt4.setVisible(false);
prompt5.setVisible(false);
input3.setVisible(false);
input4.setVisible(false);
btn2.setVisible(false);
btn3.setVisible(false);
btn4.setVisible(false);
btn1.addActionListener(this);
btn2.addActionListener(this);
btn3.addActionListener(this);
btn4.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
if(e.getActionCommand()=="登录")
{
String a,b;
a=input1.getText();
b=input2.getText();
input1.setText("");
if((a.equals("12")==true)&&(b.equals("12")==true))
{
prompt2.setText(" 姓名:");
prompt3.setText(" 学号:");
prompt4.setVisible(true);
prompt5.setVisible(true);
input3.setVisible(true);
input4.setVisible(true);
btn2.setVisible(true);
btn3.setVisible(true);
btn4.setVisible(true);
btn3.setEnabled(false);
btn4.setEnabled(false);
btn1.setLabel("查询");
input1.setText("登录成功");
input1.selectAll();
}
else
input2.setText("用户名或密码错");
}
if(e.getActionCommand()=="增加")
{
boolean scucss=true;
try
{
XingMing();
}
catch(EmptyException as)
{
input1.setText("姓名不能为空");
scucss=false;
}
try
{
xh=Integer.parseInt(input2.getText());
}
catch(NumberFormatException m)
{
input2.setText("学号为空或格式错");
scucss=false;
}
bj=input3.getText();
try
{
ChengJi();
}
catch(EmptyException as)
{
cj=-1;
}
catch(OverException dd)
{
input4.setText("应在0-100间");
scucss=false;
}
catch(NumberFormatException cm)
{
input4.setText("成绩应为数据");
scucss=false;
}
if(scucss==true)
{
SI=new StudentInf(xm,xh,bj,cj);
Insert(SI);
}
}
if(e.getActionCommand()=="修改")
{
xm=input1.getText();
xh=Integer.parseInt(input2.getText());
bj=input3.getText();
cj=Integer.parseInt(input4.getText());
SI=new StudentInf(xm,xh,bj,cj);
StuInf.setElementAt(SI, mid);
btn3.setEnabled(false);
}
if(e.getActionCommand()=="删除")
{
StuInf.removeElementAt(mid);
btn4.setEnabled(false);
input1.setText("删除成功");
input2.setText("");
input3.setText("");
input4.setText("");
}
if(e.getActionCommand()=="查询")
{
boolean right=true;
try
{
xh=Integer.parseInt(input2.getText());
}
catch(NumberFormatException m)
{
input2.setText("学号为空或格式错");
right=false;
}
if(right==true)
{
search(xh);
btn3.setEnabled(true);
btn4.setEnabled(true);
}
}

}
//查找方法
public void search(int k)
{
boolean exist=false;
int low=0;
int high=StuInf.size()-1;
while(low<=high)
{
mid=(high+low)/2;
StudentInf a1=(StudentInf) StuInf.elementAt(mid);
if(a1.getStuNo()==k)
{
SI=(StudentInf) StuInf.elementAt(mid);
String x = String.valueOf(SI.getStuNo());
exist=true;
input1.setText(SI.getname());
input1.selectAll();
input2.setText("0"+x);
input3.setText(SI.getClassNo());
if(SI.getLevel()==-1)
input4.setText("未参加考试");
else
{
String y = String.valueOf(SI.getLevel());
input4.setText(y);
}
break;
}
else if(a1.getStuNo()<k)
low=mid+1;
else
high=mid-1;
}
if(exist==false)
{
input1.setText("无此学号学生信息");
input1.selectAll();
}
}
//添加方法
public void Insert(StudentInf q)
{
int i=0;

if(StuInf.isEmpty()==true)
{
StuInf.addElement(q);
input1.setText("");
input2.setText("");
input3.setText("");
input4.setText("");
}
else
{
StudentInf xh;
xh=(StudentInf) StuInf.firstElement();
while(xh.getStuNo()<q.getStuNo())
{
i++;
if(i<StuInf.size())
xh=(StudentInf) StuInf.elementAt(i);
else
break;
}
if(xh.getStuNo()==q.getStuNo())
{
input2.setText("此学生信息已存在");
input2.requestFocus();
input2.selectAll();
}
else
{
StuInf.insertElementAt(q,i);
input1.setText("");
input2.setText("");
input3.setText("");
input4.setText("");
}
}
}

//异常类
class OverException extends Exception
{
String over;
}
class EmptyException extends Exception
{
String empty;
}
void XingMing() throws EmptyException
{
if((input1.getText()).equals(""))
throw (new EmptyException());
else
xm=input1.getText();
}
void ChengJi() throws OverException,EmptyException
{
if((input4.getText()).equals(""))
throw(new EmptyException());
else
cj=Integer.parseInt(input4.getText());
if(cj<0||cj>100)
throw (new OverException());
}

//学生信息类
public class StudentInf
{
private String name;
private int StuNo;
private String ClassNo;
private int Level;
StudentInf(String xingming,int xuehao,String banji,int chengji)
{
name=xingming;
StuNo=xuehao;
ClassNo=banji;
Level=chengji;
}
public int getStuNo()
{
return StuNo;
}
public String getname()
{
return name;
}
public String getClassNo()
{
return ClassNo;
}
public int getLevel()
{
return Level;
}
}

}

‘肆’ 怎么用JAVA编写一个班级管理系统

5.19软件java班级免费下载

链接:https://pan..com/s/1J2uKomN_yWZHGthTR5HZOg

提取码:mcpa

Java是一门面向对象编程语言,不仅吸收了C++语言的各种优点,还摒弃了C++里难以理解的多继承、指针等概念,因此Java语言具有功能强大和简单易用两个特征。Java语言作为静态面向对象编程语言的代表,极好地实现了面向对象理论,允许程序员以优雅的思维方式进行复杂的编程 。

‘伍’ 如何用java制作学生管理系统

是要小型的还是大型的 小型的 需要数据库吗?下面这是个 控制台输出的

importjava.util.List;
importjava.util.Scanner;

importcn.com.shxt.DBUtils.JdbcTool;

publicclassStudentManager{
/*
1.学生信息管理系统,界面如下
1--学生信息添加
2--全部学生信息查询
3--查询录取学生的信息
4--按学号查询录取学生的信息
5--按姓名查询录取学生的信息
6--退出

*/
publicstaticvoidmain(String[]args){
Scannerscan=newScanner(System.in);
JdbcTooljt=newJdbcTool();
List<List<String>>tableList;
intflag;
Stringno;
Stringname;
Stringmain;
Stringpolitics;
StringEnglish;
StringMath;
StringMajor;
StringTotal;
Stringsql;
booleanpanan=true;
while(panan){
System.out.println();
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("请输入序号,选择功能");
flag=scan.nextInt();
switch(flag){
case1:
System.out.println("请输入学生的学号、姓名、报考专业、政治、英语、高数、专业课分数");
no=scan.next();
name=scan.next();
main=scan.next();
politics=scan.next();
English=scan.next();
Math=scan.next();
Major=scan.next();
inttotal=0;
total=Integer.parseInt(politics)+Integer.parseInt(English)+Integer.parseInt(Math)+Integer.parseInt(Major);
sql="insertintostumanager(s_no,s_name,s_main,s_politics,s_English,s_Math,s_Major,s_Total)values('"+no+"','"+name+"','"+main+"',"+politics+",'"+English+"','"+Math+"','"+Major+"','"+total+"')";
jt.update(sql);
System.out.println("添加成功");
break;
case2:
sql="select*fromstumanagerorderbys_totaldesc";
tableList=jt.query(sql);
if(tableList!=null&&tableList.size()>0){
tableList=jt.query(sql);
for(List<String>rowList:tableList){
System.out.println("id 学号 姓名 专业 政治 英语 高数 专业 总分 ");
System.out.println(rowList.get(0)+" "+rowList.get(1)+" "+rowList.get(2)+" "+rowList.get(3)+" "+rowList.get(4)+" "+rowList.get(5)+" "+rowList.get(6)+" "+rowList.get(7)+" "+rowList.get(8));
}
}else{
System.out.println("没有学生信息,请添加~~");
break;
}
break;
case3:
System.out.println("请输入报考专业以及政治、英语、高数、专业课、总分的分数");
main=scan.next();
politics=scan.next();
English=scan.next();
Math=scan.next();
Major=scan.next();
Total=scan.next();
sql="select*fromstumanagerwheres_main='"+main+"'ands_politics>="+politics+"ands_English>="+English+"ands_Math>="+Math+"ands_Major>="+Major+"ands_Total>="+Total+"";
tableList=jt.query(sql);
if(tableList.size()!=0){
tableList=jt.query(sql);
for(List<String>rowList:tableList){
System.out.println("id 学号 姓名 专业 政治 英语 高数 专业 总分 ");
System.out.println(rowList.get(0)+" "+rowList.get(1)+" "+rowList.get(2)+" "+rowList.get(3)+" "+rowList.get(4)+" "+rowList.get(5)+" "+rowList.get(6)+" "+rowList.get(7)+" "+rowList.get(8));
System.out.println("恭喜你,你被录取了");
}
}else{
System.out.println("抱歉,你没有被录取");
break;
}
break;
case4:
System.out.println("请输入要查询的学生的学号以及政治、英语、高数、专业课、总分的录取分数");
no=scan.next();
politics=scan.next();
English=scan.next();
Math=scan.next();
Major=scan.next();
Total=scan.next();
System.out.println("此学生的信息:");
sql="select*fromstumanagerwheres_politics>="+politics+"ands_English>="+English+"ands_Math>="+Math+"ands_Major>="+Major+"ands_Total>="+Total+"ands_no="+no+"";
tableList=jt.query(sql);
if(tableList!=null&&tableList.size()>0){
tableList=jt.query(sql);
for(List<String>rowList:tableList){
System.out.println("id 学号 姓名 专业 政治 英语 高数 专业 总分 ");
System.out.println(rowList.get(0)+" "+rowList.get(1)+" "+rowList.get(2)+" "+rowList.get(3)+" "+rowList.get(4)+" "+rowList.get(5)+" "+rowList.get(6)+" "+rowList.get(7)+" "+rowList.get(8));
System.out.println("恭喜你,你被录取了");
}
}else{
System.out.println("抱歉,你没有被录取");
break;
}
break;
case5:
System.out.println("请输入要查询的学生姓名(单个文字也可)以及政治、英语、高数、专业课、总分的录取分数");
name=scan.next();
politics=scan.next();
English=scan.next();
Math=scan.next();
Major=scan.next();
Total=scan.next();
sql="select*fromstumanagerwheres_politics>="+politics+"ands_English>="+English+"ands_Math>="+Math+"ands_Major>="+Major+"ands_Total>="+Total+"ands_namelike'%"+name+"%'";
tableList=jt.query(sql);
if(tableList!=null&&tableList.size()>0){
tableList=jt.query(sql);
for(List<String>rowList:tableList){
System.out.println("id 学号 姓名 专业 政治 英语 高数 专业 总分 ");
System.out.println(rowList.get(0)+" "+rowList.get(1)+" "+rowList.get(2)+" "+rowList.get(3)+" "+rowList.get(4)+" "+rowList.get(5)+" "+rowList.get(6)+" "+rowList.get(7)+" "+rowList.get(8));
System.out.println("恭喜你,你被录取了");
}
}else{
System.out.println("抱歉,你没有被录取");
break;
}
break;
case0:
panan=false;
break;

}

}
}
}

‘陆’ 简单的java学生信息管理系统

package bean; public class Student { String name; String studentId; String sex; int grade; public Student(String name,String studentId,String sex,int grade){ this.name= name; this.studentId= studentId; this.sex = sex; this.grade = grade; } public int getGrade(){ return grade; } public String getName(){ return name; } public String getSex(){ return sex; } public void setGrade(int g){ this.grade = g; } public String getStudentId(){ return studentId; } }
System.out.println("***************"); System.out.println("*欢迎来到学生管理系统 *"); System.out.println("*1:增加学生 *"); System.out.println("*2:删除学生 *"); System.out.println("*3:修改成绩 *"); System.out.println("*4:查询成绩 *"); System.out.println("***************"); System.out.println("您想选择的操作是:");
import java.util.*;
Scanner sc = new Scanner(System.in); int choice = sc.nextInt();
package test; import java.util.*; import bean.Student; public class Manager { static List<Student> StudentList = new LinkedList<Student>(); public static void main(String[] agrs){ select(StudentList); } private static void select(List<Student> StudentList ){ System.out.println("***************"); System.out.println("*欢迎来到学生管理系统 *"); System.out.println("*1:增加学生 *"); System.out.println("*2:删除学生 *"); System.out.println("*3:修改成绩 *"); System.out.println("*4:查询成绩 *"); System.out.println("***************"); System.out.println("您想选择的操作是:"); Scanner sc = new Scanner(System.in); int choice = sc.nextInt(); switch(choice){ //增加学生 case 1: System.out.print("请输入学生的姓名:"); Scanner Sname = new Scanner(System.in); String name = Sname.nextLine(); System.out.print("请输入学生的性别:"); Scanner Ssex = new Scanner(System.in); String sex = Ssex.nextLine(); System.out.print("请输入学生的学号:"); Scanner SId = new Scanner(System.in); String studentId = SId.nextLine(); System.out.print("请输入学生的成绩:"); Scanner Sgrade = new Scanner(System.in); int grade = Sgrade.nextInt(); StudentList.add(new Student(name,studentId,sex,grade)); System.out.println("添加成功!!!!!"); select(StudentList); break; //删除学生成绩 case 2: System.out.print("请告诉我需要删除学生的学号:"); Scanner Sid = new Scanner(System.in); String SstudentId = Sid.nextLine(); boolean isfindDelete = false; for (int i = 0; i < StudentList.size(); i++) { if(SstudentId.equals(StudentList.get(i).getStudentId())){ System.out.println("发现了该学生,正在删除..."); StudentList.remove(i); System.out.println("删除成功!!!"); isfindDelete =true; } } if(!isfindDelete){ System.out.println("抱歉,没有找到"); } select(StudentList); break; //修改学生成绩 case 3: System.out.print("请告诉我需要修改成绩学生的学号:"); Scanner GId = new Scanner(System.in); String GstudentId = GId.nextLine(); boolean isfindChange = false; for (int j = 0; j < StudentList.size(); j++) { if(GstudentId.equals(StudentList.get(j).getStudentId())){ System.out.println("发现了该学生,正在修改..."); System.out.println("学生原成绩为"+StudentList.get(j).getGrade()); System.out.print("请输入修改后学生的成绩:"); Scanner Ggrade = new Scanner(System.in); int grade2 = Ggrade.nextInt(); StudentList.get(j).setGrade(grade2); System.out.println("修改成功!!!"); isfindChange =true; }else{ } } if(!isfindChange){ System.out.println("抱歉,没有找到"); } select(StudentList); break; //查看学生成绩 case 4: System.out.print("请告诉我需要查询学生的学号:"); Scanner CId = new Scanner(System.in); String CstudentId = CId.nextLine(); boolean isfindData = false; for (int i = 0; i < StudentList.size(); i++) { if(CstudentId.equals(StudentList.get(i).getStudentId())){ System.out.println("名字:"+StudentList.get(i).getName()); System.out.println("性别:"+StudentList.get(i).getSex()); System.out.println("学号:"+StudentList.get(i).getStudentId()); System.out.println("成绩:"+StudentList.get(i).getGrade()); isfindData = true; } } if(!isfindData){ System.out.println("抱歉,没有找到"); } select(StudentList); break; default: System.out.println("您输入的数字有误,请重新输入:"); break; } } }

‘柒’ 用java编写学生管理系统

package com.tree;

import java.util.Arrays;

public class StudentDemo {

private int[] temp;

public StudentDemo(int[] temp) {
this.temp = temp;
}

public void printAllGrade() {
if (temp != null) {
for (int i = 0; i < temp.length; i++) {
System.out.println("学号 " + (i + 1) + ":" + temp[i]);
}
} else {
System.out.println("参数有误!");
}
}

public void printAvarage() {
if (temp != null) {
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 printDistribution(){
if(temp!=null){
Arrays.sort(temp);// 排序数据
StringBuffer a10 = new StringBuffer();//00-09
StringBuffer a20 = new StringBuffer();//10-19
StringBuffer a30 = new StringBuffer();//20-29
StringBuffer a40 = new StringBuffer();//30-39
StringBuffer a50 = new StringBuffer();//40-49
StringBuffer a60 = new StringBuffer();//50-59
StringBuffer a70 = new StringBuffer();//60-69
StringBuffer a80 = new StringBuffer();//70-79
StringBuffer a90 = new StringBuffer();//80-89
StringBuffer a99 = new StringBuffer();//90-99
StringBuffer 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.printDistribution();
s.printAvarage();

}

}

printMax() 输出学生的最高成绩 和 printMin() 输出学生的最低成绩 我为了方便就直接放到printAvarage()里面了,你自己看下就明白;

这题太简单了,给分吧;

‘捌’ 怎么用java做一个简单的学生管理系统

用java写的话,可以用List来实现学生管理系统:
首先,管理系统是针对学生对象的,所以我们先把学生对象就写出来:
package bean;
public class Student {
String name;
String studentId;
String sex;
int grade;
public Student(String name,String studentId,String sex,int grade){
this.name= name;
this.studentId= studentId;
this.sex = sex;
this.grade = grade;
}
public int getGrade(){
return grade;
}
public String getName(){
return name;
}
public String getSex(){
return sex;
}
public void setGrade(int g){
this.grade = g;
}
public String getStudentId(){
return studentId;
}
}
这里面定义了一些得到当前学生对象数据的一些get方法,和成绩修改的set方法,代码很简单,就不做详细的解答。
就下来就是我们的正文了。
虽然我们暂时不用swing来做界面,但是总得要看的过去吧,所以,先做了一个比较简单的界面:
System.out.println("***************");
System.out.println("*欢迎来到学生管理系统 *");
System.out.println("*1:增加学生 *");
System.out.println("*2:删除学生 *");
System.out.println("*3:修改成绩 *");
System.out.println("*4:查询成绩 *");
System.out.println("***************");
System.out.println("您想选择的操作是:");
这里可以看到,我们的是用一个1234来选择项目,说以不得不讲一下Java如何获取到键盘所输入的数据---------Scanner ,要使用这个,首先需要import进来一个包:
例如这里:
import java.util.*;
之后的两行代码搞定输入:
Scanner sc = new Scanner(System.in);
int choice = sc.nextInt();
接下来就是各个功能的实现:

package test;
import java.util.*;
import bean.Student;
public class Manager {
static List<Student> StudentList = new LinkedList<Student>();
public static void main(String[] agrs){
select(StudentList);
}
private static void select(List<Student> StudentList ){
System.out.println("***************");
System.out.println("*欢迎来到学生管理系统 *");
System.out.println("*1:增加学生 *");
System.out.println("*2:删除学生 *");
System.out.println("*3:修改成绩 *");
System.out.println("*4:查询成绩 *");
System.out.println("***************");
System.out.println("您想选择的操作是:");
Scanner sc = new Scanner(System.in);
int choice = sc.nextInt();
switch(choice){
//增加学生
case 1:
System.out.print("请输入学生的姓名:");
Scanner Sname = new Scanner(System.in);
String name = Sname.nextLine();
System.out.print("请输入学生的性别:");
Scanner Ssex = new Scanner(System.in);
String sex = Ssex.nextLine();
System.out.print("请输入学生的学号:");
Scanner SId = new Scanner(System.in);
String studentId = SId.nextLine();
System.out.print("请输入学生的成绩:");
Scanner Sgrade = new Scanner(System.in);
int grade = Sgrade.nextInt();
StudentList.add(new Student(name,studentId,sex,grade));
System.out.println("添加成功!!!!!");
select(StudentList);
break;
//删除学生成绩
case 2:
System.out.print("请告诉我需要删除学生的学号:");
Scanner Sid = new Scanner(System.in);
String SstudentId = Sid.nextLine();
boolean isfindDelete = false;
for (int i = 0; i < StudentList.size(); i++) {
if(SstudentId.equals(StudentList.get(i).getStudentId())){
System.out.println("发现了该学生,正在删除...");
StudentList.remove(i);
System.out.println("删除成功!!!");
isfindDelete =true;
}
}
if(!isfindDelete){
System.out.println("抱歉,没有找到");
}
select(StudentList);
break;
//修改学生成绩
case 3:
System.out.print("请告诉我需要修改成绩学生的学号:");
Scanner GId = new Scanner(System.in);
String GstudentId = GId.nextLine();
boolean isfindChange = false;
for (int j = 0; j < StudentList.size(); j++) {
if(GstudentId.equals(StudentList.get(j).getStudentId())){
System.out.println("发现了该学生,正在修改...");
System.out.println("学生原成绩为"+StudentList.get(j).getGrade());
System.out.print("请输入修改后学生的成绩:");
Scanner Ggrade = new Scanner(System.in);
int grade2 = Ggrade.nextInt();
StudentList.get(j).setGrade(grade2);
System.out.println("修改成功!!!");
isfindChange =true;
}else{
}
}
if(!isfindChange){
System.out.println("抱歉,没有找到");
}
select(StudentList);
break;
//查看学生成绩
case 4:
System.out.print("请告诉我需要查询学生的学号:");
Scanner CId = new Scanner(System.in);
String CstudentId = CId.nextLine();
boolean isfindData = false;
for (int i = 0; i < StudentList.size(); i++) {
if(CstudentId.equals(StudentList.get(i).getStudentId())){
System.out.println("名字:"+StudentList.get(i).getName());
System.out.println("性别:"+StudentList.get(i).getSex());
System.out.println("学号:"+StudentList.get(i).getStudentId());
System.out.println("成绩:"+StudentList.get(i).getGrade());
isfindData = true;
}
}
if(!isfindData){
System.out.println("抱歉,没有找到");
}
select(StudentList);
break;
default:
System.out.println("您输入的数字有误,请重新输入:");
break;
}
}
}
可以看见,我把所有的实现过程全部放在select();方法中了,这样可以避免我选择完了一个操作后不能继续其他操作。大部分的操作都是依靠for循环来遍历操作,方便快捷。

‘玖’ 基于JAVA的学生信息管理系统

2、教学管理:教学信息管理模块主要实现各种与教学相关信息的设置和维护的操作,包括以下几方面的内容:院系设置、专业设置、年级设置、班级设置、学期设置、课程开设等 3、学籍管理:学生学籍管理模块主要实现对学生基本信息的设置和维护,提供学生信息的录入和查询页面,并对学生班级更改情况进行维护等,它包括以下几方面的内容:学生基本信息维护和查询、学生增减、批量导入学生信息并自动生成学号。 其中,学生基本信息的录入、维护和查询统计功能是每个学生必须完成的功能,而学生增减和批量导入学生信息并自动生成学号则是有能力的学生可以在时间充裕的前提下进一步完成。 4、成绩管理:学生成绩管理模块主要实现对学生选修课程以及所选课程的成绩信息的设置和维护。 它包括以下几方面的内容:学生选课管理、学生成绩管理两部分。销售管理系统的主要任务是建立、维护客户信息档案、统计、汇总产品信息,进行定单的录入、维护等。要求编写Java GUI程序实现上述功能。 3 课程设计报告书主要内容1 需求分析2 总体设计2.1 设计的总体思想与算法描述 2.2 模块结构图 2.3 各功能模块的功能与处理流程描述 2.4 界面设计 3 各功能模块程序设计 按照功能模块的功能与处理流程描述给出详细的程序代码,并给出重点语句的注释. 4 小结4 课程设计要求 1 按时到机房签到,在指定机位上机。遵守机房纪律。 2 独立完成课程设计任务。指导教师到机位上指导学生和分时段验收学生完成的程序。 3 按时提交打印的课程设计报告书。 5 课程设计参考书 1 许文宪 懂子建. Java程序设计教程与实训 北京:北京大学出版社,2005. 2 辛运帏 .Java程序设计.北京:清华大学出版社, 2004 3 蔡翠平 .Java程序设计.北京:清华大学出版社,2003

热点内容
六年级简便算法题 发布:2025-02-14 05:53:02 浏览:8
脚本精灵要root吗 发布:2025-02-14 05:51:30 浏览:212
安卓手机如何录屏怎么去掉触摸显示 发布:2025-02-14 05:36:23 浏览:996
安卓系统新品推荐怎么关 发布:2025-02-14 05:35:44 浏览:888
虚拟存储器的基础是 发布:2025-02-14 05:32:24 浏览:516
androidstudio出错 发布:2025-02-14 05:32:14 浏览:305
面容id存储多张脸 发布:2025-02-14 05:31:30 浏览:656
网站源码百度云 发布:2025-02-14 05:30:53 浏览:214
我得世界星际方块服务器ip 发布:2025-02-14 05:23:03 浏览:940
动态库什么时候不需要重新编译 发布:2025-02-14 05:18:56 浏览:14