導航:首頁 > 編程語言 > 簡單的學生管理系統java

簡單的學生管理系統java

發布時間:2022-05-16 09:38:22

java實現簡易學生信息管理系統

使用JFileChooser來選擇打開文件, 使用FileInputStream進行讀取文件,FileOutputStream來寫文件 這些沒什麼難度吧。中間的顯示,你就直接用JFileArea就是了,然後設置為自動換行。

Ⅱ 用java編寫一個簡單的學生管理系統實現添加,刪除,修改,查詢的功能

你需要的是基於gui界面的還是javaweb的呢?
這兩種項目有共性也有區別, 比如在數據層的部分可以統一的抽象出來公用。
但是在view層差別還蠻大的, swing是各種基於listener來觸發業務邏輯, 與javaweb開發不太一樣, 我最近兩種都有實現, 感受是還算簡單。
希望能夠幫助你

Ⅲ 使用java語言連接資料庫編寫一個簡單的學生信息管理系統


public static void findInfo(String filePath) throws IOException {

//把之前存入到數據的文件,讀取到集合中來。

ArrayList<Student> list = new ArrayList<Student>();

readData(list,filePath);

//遍歷集合

for(int i=0;i<list.size();i++) {

Student stu = list.get(i);

System.out.println(stu.getId()+" "+stu.getName()+" "+stu.getAddress());

}

}

private static void readData(ArrayList<Student> list ,String filePath) throws NumberFormatException, IOException{

FileReader fr = new FileReader(filePath);

BufferedReader br = new BufferedReader(fr);

//讀物文件裡面的信息

String line = null;

while((line=br.readLine())!=null) {

String[] str = line.split(",");

//獲取的數據封裝成對象

//stu.getId()+","+stu.getName()+","+stu.getAge()

Student stu = new Student();

stu.setId(str[0]);

stu.setName(str[1]);

stu.setAge(Integer.valueOf(str[2]));

//將對象放到集合中區

list.add(stu);

}

}

//輸入學生的信息

public static void addInfo(String filePath) throws IOException{

ArrayList<Student> list = new ArrayList<Student>();

Scanner sc = new Scanner(System.in);

//將輸入的信息存放到集合裡面去

for(int i=1;i<=3;i++) {

System.out.println("請輸入第"+i+"個學生的id");

String id = sc.next();

System.out.println("請輸入第"+i+"個學生的name");

String name = sc.next();

System.out.println("請輸入第"+i+"個學生的age");

int age = sc.nextInt();

Student stu = new Student();

stu.setId(id);

stu.setAge(age);

stu.setName(name);

list.add(stu);

}

//將集合裡面的信息寫到文件裡面去

writeDate(list,filePath);

}

Ⅳ 簡單的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做一個簡單的學生管理系統

用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學生管理系統

package caculater;
import java.util.Scanner;
import java.util.Arrays;
public class ResultMgr
{
public static void showMenu()
{
System.out.println("--------歡迎使用成績管理器ver1.0---------");
System.out.println("-----------1. 增加成績-------------------");
System.out.println("-----------2. 顯示所有成績(升序處理)-----");
System.out.println("-----------3. 根據下標索引刪除成績-------");
System.out.println("-----------0. 離開系統-------------------");
}
public static void main(String args[])
{
int num = 3; // 成績個數
Scanner sc = new Scanner(System.in);
double[] results = new double[num];
int index = 0;
do
{
showMenu();
int ling = sc.nextInt();
switch (ling)
{
case 1:
{
System.out.println("進入增加成績流程");
System.out.println("請錄入學生成績,格式為xx.x");
for (int i = 0; i < results.length; i++)
{
double r = sc.nextDouble();
results[index++] = r;
}
System.out.println(Arrays.toString(results));
break;
}
case 2:
{
System.out.println("進入顯示成績流程,冒泡進行中...");
ascSor(results);
System.out.println(Arrays.toString(results));
break;
}
case 3:
{
System.out.println("進入刪除成績流程 請輸入要刪除成績的下標");
for (int i = 0; i < results.length; i++)
{
System.out.print(results[i] + " [" + i + "] ");
}
System.out.println();
System.out.println("____________________________________");
int idx = sc.nextInt();
for (int i = 0; i < results.length; i++)
{
if (idx < results.length - 1)
{
results[i] = results[i + 1];
idx += 1;
}
}
num -= 1;
double[] newResults = new double[num];
for (int i = 0; i < newResults.length; i++)
{
newResults[i] = results[i];
}
results = newResults;
System.out.println("刪除 成績後: " + Arrays.toString(results));
break;
}
default:
{
System.out.println("");
System.exit(0);
}
}
} while (true);
}
public static double[] ascSor(double[] scores)
{
double temp = 0;
for (int i = 0; i < scores.length; i++)
{
for (int j = 1; j < scores.length; j++)
{
if (scores[j] < scores[j - 1])
{
temp = scores[j - 1];
scores[j - 1] = scores[j];
scores[j] = temp;
}
}
}
return scores;
}
}

// 把你的代碼稍作了修改, 如果有不好 就當參考一下吧,, 具體已經很完美了

Ⅶ 使用java集合和控制台做一個簡易的學生信息管理系統

基於JAVA集合框架,編寫一個簡單的學生管理系統,管理學生的姓名、學號、電話號碼等基礎信息。實現基本的增/刪/改/查等功能。
package doc_01.fifth;

/**
* 模塊說明: 實體類Student
*
*/
public class Student {
private String name; // 名字
private int age; // 年齡
private String sno; // 學號
private int math; // 數學成績
private int chinese; // 語文成績
private int english; // 英語成績

public int getTotal() {
return (math + chinese + english);
}

public int getAvg() {
return getTotal() / 3;
}

public String getName() {
return name;
}

public void setName(String name) {

Ⅷ 如何用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面向對象簡單學生管理系統

1.在eclipse裡面創建一個web項目
2.使用mysql工具創建資料庫和表,把增刪改查的資料庫語句熟悉下
3.初學者建議熟悉jsp把業務邏輯和實現都放在一個頁面里,讓後就是通過jsp頁面操作資料庫的操作,還需要了解下html+css+JavaScript

Ⅹ Java實現學生簡易信息管理系統

importjava.util.*;
importjava.io.*;

classStuMgr{

publicstaticclassStudent{

publicintid;
publicStringname;
publicintage;

publicStudent(intid,Stringname,intage){
this.id=id;
this.name=name;
this.age=age;
}

@Override
publicStringtoString(){
returnid+","+name+","+age;
}
}

publicList<Student>stuList=newLinkedList<>();

publicvoidadd(){
Scannersc=newScanner(System.in);
System.out.println("請輸入學生學號:");
Stringid=sc.nextLine();
intintId=0;
try{
intId=Integer.parseInt(id);
}catch(NumberFormatExceptionex){
System.out.println("學號輸入有誤,請輸入數字!");
return;
}
if(find(intId)!=null){
System.out.println("該學號已經存在!");
return;
}
System.out.println("請輸入學生姓名:");
Stringname=sc.nextLine();
System.out.println("請輸入學生年齡:");
Stringage=sc.nextLine();
intintAge=0;
try{
intAge=Integer.parseInt(age);
}catch(NumberFormatExceptionex){
System.out.println("年齡輸入有誤,請輸入數字!");
return;
}
Studentstu=newStudent(intId,name,intAge);
stuList.add(stu);
store();
System.out.println("-----------------------");
System.out.println("學生信息已增加");
System.out.println(stu);
System.out.println("-----------------------");
}

publicvoiddel(){
Scannersc=newScanner(System.in);
System.out.println("請輸入學生學號:");
Stringid=sc.nextLine();
intintId=0;
try{
intId=Integer.parseInt(id);
}catch(NumberFormatExceptionex){
System.out.println("學號輸入有誤,請輸入數字!");
return;
}
Studentstu=find(intId);
if(stu==null){
System.out.println("該學號不存在!");
return;
}
stuList.remove(stu);
store();
System.out.println("-----------------------");
System.out.println("學生信息已刪除");
System.out.println(stu);
System.out.println("-----------------------");
}

publicvoidfind(){
Scannersc=newScanner(System.in);
System.out.println("請輸入學生學號:");
Stringid=sc.nextLine();
intintId=0;
try{
intId=Integer.parseInt(id);
}catch(NumberFormatExceptionex){
System.out.println("學號輸入有誤,請輸入數字!");
return;
}
Studentstu=find(intId);
if(stu==null){
System.out.println("該學號不存在!");
return;
}
System.out.println("-----------------------");
System.out.println("查找學生信息如下");
System.out.println(stu);
System.out.println("-----------------------");
}

publicStudentfind(intid){
for(Studentstu:stuList){
if(stu.id==id){
returnstu;
}
}
returnnull;
}

publicvoidmodify(){
store();
}

publicvoidforeach(){
System.out.println("-----------------------");
for(Studentstu:stuList){
System.out.println(stu);
}
System.out.println("-----------------------");
}

publicvoidstore(){
Iteratoriterator=stuList.iterator();
Filefile=newFile("stuList.txt");
FileWriterfw=null;
BufferedWriterwriter=null;
try{
fw=newFileWriter(file);
writer=newBufferedWriter(fw);
while(iterator.hasNext()){
writer.write(iterator.next().toString());
writer.newLine();//換行
}
writer.flush();
}catch(FileNotFoundExceptione){
e.printStackTrace();
}catch(IOExceptione){
e.printStackTrace();
}finally{
try{
writer.close();
fw.close();
}catch(IOExceptione){
e.printStackTrace();
}
}
}

publicstaticvoidmain(String[]args){
StuMgrmgr=newStuMgr();
while(true){
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("6:退出");
System.out.println("-----------------------");
Scannersc=newScanner(System.in);
Stringop=sc.nextLine();
if("6".equals(op)){
return;
}
if("1".equals(op)){
mgr.add();
}
if("2".equals(op)){
mgr.del();
}
if("3".equals(op)){
mgr.find();
}
if("4".equals(op)){
mgr.modify();
}
if("5".equals(op)){
mgr.foreach();
}
}

}
}

時間倉促,還有一個modify方法沒實現,留給你自己練手。

閱讀全文

與簡單的學生管理系統java相關的資料

熱點內容
悅翔V3怎樣換壓縮機 瀏覽:352
韓劇男主不勃起去 瀏覽:215
4位數字電子鍾單片機 瀏覽:699
初中程序員月薪 瀏覽:968
姜恩惠電影法利賽人雲盤 瀏覽:786
程序員的焦慮有哪些 瀏覽:348
10部緬甸電影 瀏覽:207
程序員賓利 瀏覽:731
初一編程軟體教學 瀏覽:918
ftp伺服器的地址是哪個 瀏覽:15
圖像模糊處理演算法 瀏覽:34
法國啄木鳥電影有哪些 瀏覽:579
javanio內存 瀏覽:549
react源碼有多長 瀏覽:60
聖經舊約電影 瀏覽:704
你經常去電影院嗎英文翻譯 瀏覽:202
androidzip換膚 瀏覽:761
按f8怎麼進命令行界面 瀏覽:607
dn20加密防盜閥 瀏覽:366
金剛鐵拳電影 瀏覽:223