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

java學生管理系統

發布時間:2022-01-31 06:16:36

『壹』 用java寫一個學生管理系統。

125819398 專業代寫畢業設計 酌情收費

『貳』 用Java 實現一個簡單的學生管理系統! 求代碼,求代碼!!!!

完成了,希望能幫到你
剛開始會叫你輸入編號選擇功能
import java.io.*;

public class student {

public static void main(String args[]) throws IOException{

int[] stud = {77,99,55,46,82,75,65,31,74,85};

System.out.println("請選擇功能:");//輸入編號選擇功能
System.out.println("1、輸入學號,查詢該學生成績:");
System.out.println("2、輸入成績,查詢學生學號:");
System.out.println("3、輸入學號,刪除該學生成績");
System.out.println("請選擇編號:");

BufferedReader td = new BufferedReader(new InputStreamReader(System.in));

String temp = td.readLine();

int choice = Integer.valueOf(temp);

if(choice == 1){//一為查詢學生成績

System.out.println("請輸入學號:");

BufferedReader sd = new BufferedReader(new InputStreamReader(System.in));

String temp_sd = sd.readLine();

int No = Integer.valueOf(temp_sd);

System.out.print("學號為 "+No+" 的學生成績為: " + stud[No-1] +"分");
}

if(choice == 2){//二為查詢學生編號

System.out.println("請輸入成績:");

BufferedReader sd = new BufferedReader(new InputStreamReader(System.in));

String chengji = sd.readLine();

int temp_cj = Integer.valueOf(chengji);

for(int i=0;i<stud.length;i++){

if(temp_cj == stud[i]){

System.out.print("成績為 "+ temp_cj+ "的學生的學號為: "+(i+1));

}
}
}
if(choice == 3){//三為刪除操作

System.out.println("請輸入學號:");

BufferedReader sd = new BufferedReader(new InputStreamReader(System.in));

String temp_sd = sd.readLine();

int No = Integer.valueOf(temp_sd);

stud[No-1]=0;//直接賦值為0,不刪除學生

System.out.print("學號為 "+No+" 的學生成績為: " + stud[No-1] +"分");
}

}
}

『叄』 簡單的JAVA學生管理系統代碼

package com.test;
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[]){
Scanner sc = new Scanner(System.in);
double[] results = new double[3];
int index = 0;
do{
showMenu();
int ling = sc.nextInt();
switch(ling){
case 1:{
System.out.println("進入增加成績流程");
System.out.println("請錄入學生成績,格式為xx.x");
double r = sc.nextDouble();
results[index++] = r;
System.out.println(Arrays.toString(results));
break;
}
case 2:{
System.out.println("進入顯示成績流程,冒泡進行中...");
break;
}
case 3:{
System.out.println("進入刪除成績流程");
break;
}
default:{
System.out.println("");
System.exit(0);
}
}

}while(true);
}
}

『肆』 Java實現一個簡單的學生信息管理系統

看了你的需求,其實除了java,你還可以用易查分來做查詢管理系統呢!通過易查分 不用寫代碼,上 傳個excel表格就可以生成,超級簡單的!

『伍』 Java學生信息管理系統

稍等吧 現在幫你寫個 不是難事 寫出來通知你 需要資料庫嗎? 還在不? Student 類 public class Student { private int id; private int age; private int score; private String name; public Student() { } public Student(int id, int age

『陸』 如何用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實現學生管理系統

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

『捌』 用java編寫學生管理系統

我也是初學寫的不好
public class Student {
static int[] gradesArray={87,68,94,100,83,78,85,91,76,87};
public Student(int[]gradesArray){

}
public void printAllGrade(){
for (int i = 0; i < gradesArray.length; i++) {
System.out.println("學號"+(i+1)+"成績是"+gradesArray[i]);
}
}
public void printAvarage(){
double sum = 0;
for (int i = 0; i < gradesArray.length; i++) {
sum+=gradesArray[i];
}
System.out.println("\n平均成績是"+sum/gradesArray.length);
}
public void printMax(){
int max=gradesArray[0];
for (int i = 0; i < gradesArray.length; i++) {
if(gradesArray[i]>max){
max=gradesArray[i];
}
}
System.out.println("\n最高分時"+max);
}
public void printMin(){
int min=gradesArray[0];
for (int i = 0; i < gradesArray.length; i++) {
if (gradesArray[i]<min){
min=gradesArray[i];
}
}
System.out.println("\n最低分時"+min);
}
public void printDistribution(){
int a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0;
for (int i = 0; i < gradesArray.length; i++) {
if(gradesArray[i]<10){
a++;
}else if (gradesArray[i]>=10&&gradesArray[i]<20) {
b++;
}
else if (gradesArray[i]>=20&&gradesArray[i]<30) {
c++;
}
else if (gradesArray[i]>=30&&gradesArray[i]<40) {
d++;
}
else if (gradesArray[i]>=40&&gradesArray[i]<50) {
e++;
}
else if (gradesArray[i]>=50&&gradesArray[i]<60) {
f++;
}
else if (gradesArray[i]>=60&&gradesArray[i]<70) {
g++;
}
else if (gradesArray[i]>=70&&gradesArray[i]<80) {
h++;
}
else if (gradesArray[i]>=80&&gradesArray[i]<90) {
j++;
}
else if (gradesArray[i]>=90&&gradesArray[i]<100) {
k++;
}
}
System.out.println("\n成績分布是");
System.out.print("0-10:");
for (int i = 0; i <=a; i++) {
System.out.print("*");
}
System.out.print("10-20:");
for (int i = 0; i <=b; i++) {
System.out.print("*");
}
System.out.print("20-30:");
for (int i = 0; i <=c; i++) {
System.out.print("*");
}
System.out.print("30-40:");
for (int i = 0; i <=d; i++) {
System.out.print("*");
}
System.out.print("40-50:");
for (int i = 0; i <=e; i++) {
System.out.print("*");
}
System.out.print("50-60:");
for (int i = 0; i <=f; i++) {
System.out.print("*");
}
System.out.print("60-70:");
for (int i = 0; i <=g; i++) {
System.out.print("*");
}
System.out.print("70-80:");
for (int i = 0; i <=h; i++) {
System.out.print("*");
}
System.out.print("80-90:");
for (int i = 0; i <=j;i++) {
System.out.print("*");
}
System.out.print("90-100:");
for (int i = 0; i <=k; i++) {
System.out.print("*");
}
}
public static void main(String[] args) {
Student student=new Student(gradesArray);
student.printAllGrade();
student.printAvarage();
student.printMax();
student.printMin();
student.printDistribution();
}

}

『玖』 如何用java寫一個學生管理系統

直接上開源網站上面找,http://www.oschina.net/code/snippet_141356_7590 這個有

『拾』 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學生管理系統相關的資料

熱點內容
路由器搭橋遠端伺服器地址是什麼 瀏覽:515
編譯動態庫時會連接依賴庫嗎 瀏覽:706
淘寶手機加密是隨機的嗎 瀏覽:672
解壓包子怎麼裝飾 瀏覽:585
四個數湊24演算法 瀏覽:676
哪一種不是vi編譯器的模式 瀏覽:168
xp在此處打開命令窗口 瀏覽:128
代碼編譯運行用什麼軟體 瀏覽:997
動態庫在程序編譯時會被連接到 瀏覽:760
python超簡單編程 瀏覽:259
獲取命令方 瀏覽:976
怎樣製作文件夾和圖片 瀏覽:60
調研編譯寫信息 瀏覽:861
python馮諾依曼 瀏覽:419
同時安裝多個app有什麼影響 瀏覽:254
奧術殺戮命令宏 瀏覽:184
用sdes加密明文字母e 瀏覽:361
單片機原理及應用試題 瀏覽:425
易語言開啟指定文件夾 瀏覽:40
馬思純參加密室大逃脫 瀏覽:322