久久99精品久久久久久琪琪,久久人人爽人人爽人人片亞洲,熟妇人妻无码中文字幕,亚洲精品无码久久久久久久

學生管理系統main方法

時間:2019-05-13 18:14:47下載本文作者:會員上傳
簡介:寫寫幫文庫小編為你整理了多篇相關的《學生管理系統main方法》,但愿對你工作學習有幫助,當然你在寫寫幫文庫還可以找到更多《學生管理系統main方法》。

第一篇:學生管理系統main方法

package com.qq;

import java.util.*;

public class Main {

public static void main(String[] age){

Student[] stus = new Student[100];

Scanner input = new Scanner(System.in);int choice;

int index = 0;

System.out.println(“歡迎使用學生系統n”);

while(true){

System.out.println(“1.添加學生信息”);System.out.println(“2.刪除學生信息”);System.out.println(“3.修改學生信息”);System.out.println(“4.查詢學生信息”);System.out.println(“5.顯示學生列表”);System.out.println(“6.退出學生系統n”);

choice = input.nextInt();

switch(choice){

case 1:

System.out.println(“請添加學生信息n”);Student stu = new Student();

System.out.println(“請添加學號n”);stu.setSid(input.nextInt());

System.out.println(“請添加名字n”);stu.setName(input.next());

System.out.println(“請添加年齡n”);stu.setAge(input.nextInt());

stus[index] = stu;

index++;

System.out.println(“添加成功n”);break;

case 2:

System.out.println(“開始刪除學生信息”);System.out.println(“輸入要刪除的學號”);int did = input.nextInt();

for(int i = 0;i < index;i++){if(stus[i].getSid()== did){dindex = i;break;} } if(dindex ==-1)System.out.println(“沒有n”);else {for(int i = dindex;i < index;i++){stus[i] = stus[i + 1];}index--;System.out.println(“刪除成功n”);} break;case 3:System.out.println(“開始修改學生信息”);System.out.println(“請輸入需要修改學生信息的學號”);int amendid = input.nextInt();int aindex =-1;for(int i = 0;i < stus.length;i++){if(stus[i].getSid()== amendid){aindex = i;break;}}if(aindex ==-1){System.out.println(“沒有n”);} else {while(true){System.out.println(“1.修改 學 號”);System.out.println(“2.修改 姓 名”);System.out.println(“3.修改 年 齡”);System.out.println(“4.返回主菜單n”);int t = input.nextInt();if(t == 4)break;switch(t){case 1:System.out.println(“輸入新學號”);

} } break;System.out.println(“學號修該成功n”);break;case 2:System.out.println(“輸入新名字”);stus[aindex].setName(input.next());System.out.println(“名字修改成功n”);break;case 3:System.out.println(“輸入新年齡”);stus[aindex].setAge(input.nextInt());System.out.println(“年齡修改成功n”);break;default:System.out.println(“輸入有誤n”);break;} case 4:System.out.println(“開始查詢學生信息”);System.out.println(“請輸入查詢學號”);int qindex =-1;int qid = input.nextInt();for(int i = 0;i < index;i++){if(stus[i].getSid()== qid){qindex = i;break;}}if(qindex ==-1){System.out.println(“沒有n”);} else {System.out.println(“該學生信息如下:”);System.out.println(“學號t姓名t年齡”);System.out.println(stus[qindex]);}break;case 5:System.out.println(“列表顯示全部學生信息”);System.out.println(“學號t姓名t年齡”);

for(int i = 0;i < index;i++){

}

}

}

System.out.println(stus[i]);}break;case 6:System.out.println(“謝謝使用!”);System.exit(0);default:System.out.println(“選擇錯誤!n”);break;}

第二篇:學生管理系統

import java.awt.*;import java.awt.event.*;import java.sql.*;import java.util.*;import javax.swing.*;

public class Xsglxt extends JFrame implements ActionListener { JPanel mb1,mb2;JLabel bq1;JTextField wbk1;JButton an1,an2,an3,an4;JTable bg1;

JScrollPane gd1;Xsxx xsxx2;

public static void main(String[] args)

{

Xsglxt xs=new Xsglxt();}

public Xsglxt(){

mb1=new JPanel();

bq1=new JLabel(“請輸入姓名”);

wbk1=new JTextField(10);

an1=new JButton(“查詢”);

an1.addActionListener(this);

an1.setActionCommand(“chaxun”);

mb1.add(bq1);mb1.add(wbk1);mb1.add(an1);

mb2=new JPanel();

an2=new JButton(“添加”);

an2.addActionListener(this);

an2.setActionCommand(“tianjia”);

an3=new JButton(“修改”);

an3.addActionListener(this);

an3.setActionCommand(“xiugai”);

an4=new JButton(“刪除”);

an4.addActionListener(this);

an4.setActionCommand(“shanchu”);

mb2.add(an2);mb2.add(an3);mb2.add(an4);

xsxx2=new Xsxx();

bg1=new JTable(xsxx2);gd1=new JScrollPane(bg1);

this.add(gd1);this.add(mb1,“North”);this.add(mb2,“South”);

this.setTitle(“學生管理系統”);this.setSize(500,400);this.setLocation(201,181);this.setResizable(false);this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);this.setVisible(true);

} public void actionPerformed(ActionEvent e){ if(e.getActionCommand().equals(“chaxun”)){

String xingming=this.wbk1.getText().trim();

String sql=“select * from xuesheng where xingming='”+xingming+“'”;

xsxx2=new Xsxx(sql);

bg1.setModel(xsxx2);} else if(e.getActionCommand().equals(“tianjia”)){

Tianjia tj=new Tianjia(this,“添加學生信息”,true);

xsxx2=new Xsxx();

bg1.setModel(xsxx2);

} else if(e.getActionCommand().equals(“xiugai”)){

int ii=this.bg1.getSelectedRow();

if(ii==-1)

{

JOptionPane.showMessageDialog(this,“請選中要修改的行”);

return;

}

new Xiugai(this,“修改學生信息”,true,xsxx2,ii);

xsxx2=new Xsxx();

bg1.setModel(xsxx2);}

else if(e.getActionCommand().equals(“shanchu”))

{

int ii=this.bg1.getSelectedRow();

if(ii==-1)

{

JOptionPane.showMessageDialog(this,“請選中要刪除的行”);

return;

}

String st=(String)xsxx2.getValueAt(ii,0);

PreparedStatement ps=null;

Connection ct=null;

ResultSet rs=null;

Statement sm=null;

try {

Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”);

ct=DriverManager.getConnection(“jdbc:odbc:sql server”,“sa”,“ydyd4488321”);

ps=ct.prepareStatement(“delete from xuesheng where xuehao=?”);

ps.setString(1,st);

ps.executeUpdate();

} catch(Exception e2){}

finally

{

try {

if(rs!=null)

{

rs.close();

}

if(ps!=null)

{

ps.close();

}

if(ct!=null)

{

ct.close();

}

} catch(Exception e3){}

}

xsxx2=new Xsxx();

bg1.setModel(xsxx2);

} } }

第三篇:學生管理處理方法

學生管理中常見事件處理方法建議

(個人建議,僅供參考)

一、學生個人財物丟失;

【基本原則】財物找回的可能性極小,最重要的工作是安撫學生心理。

【禁忌】直接讓學生找領導解決。班主任先過問、關心,系部和領導再關心,這樣才能讓學生感受到關心和溫暖。如果讓學生直接找領導,學生會反感班主任的漠然,最后領導又解決不好,學生會失望至極,從而產生諸多不良情緒。

【基本流程】

1、第一時間趕到現場,安撫學生心理,做好基本的調查。對于財物損失特別嚴重或案件特別惡劣的,可選擇報警。

2、財物較嚴重的失竊事件,要以書面報告系部和學生處。

3、做好學生的提醒教育工作,讓他們提高警惕和安全意識,東西不要放窗戶邊,身上和寢室都不要留大量現金和貴重物品,睡覺鎖好門。

4、因后勤維修保障不到位造成財物丟失的,要提供證據上報相關領導予以責任追求。

二、物品損壞后的維修;

【基本原則】按程序上報,要留下每次上報的證據,以便后期劃清責任。

【禁忌】病急亂求醫,找無關部門申述。

【基本流程】

1、上報后勤服務中心,按要求填寫維修單。將上報的情況記錄下來,記清楚什么時候、什么東西壞了,什么時候填了維修單?

2、兩天后,如果東西沒有得到維修,再去催一次,并再次記下。

3、再過兩天,如果仍然沒有解決,以報告形式報總務處,報告中寫明什么時間報修,沒有得到及時維修,什么時候再次催促,仍然沒有得到維修,希望總務處領導予以督促。(報告一式兩份,復印一份存檔)

4、如果仍然沒有得到維修,將相關情況報楊校長。

5、如果丟失財物或其他安全責任事故與后勤維修不到位有關,要拿著直接證據,找上級領導追究相關責任人。

6、突發事件,如停電、停水等,要及時聯系電工、水工及后勤服務中心的負責人。班主任(輔導員)有責任將相關聯系號碼告之班上學生。

三、學生失去聯系;

【基本原則】學生失去聯系后,班主任(輔導員)要表現出關心和著急,此時不要強調學生過去的過錯,更不要提事后要處理學生、開除學生,千萬不要激怒家長。一切問題等找到學生后再作處理。

【禁忌】此時與家長爭吵、沖突。

【基本流程】

1、第一時間報告家長。

2、班主任和班級學生通過各種渠道開始尋找。

3、每隔半天或一天將尋找的情況通報家長,并積極詢問家長那邊尋找的情況,并詢問家長要不要報警。

4、征求家長同意后,24小時后,班主任陪同家長直接去派出所報案。

5、學生找到后,根據實際情況,與系辦公室一起做好善后工作。

四、學生打架或發生矛盾;

【基本原則】避開學生的情緒期。當時學生正在氣頭上,班主任(輔導員)要冷

靜,不要強調對錯,不要急于批評,以半聊天的態度跟他談,先取得事情真相。

【禁忌】事情沒做調查就嚴厲批評學生或過時才調查。

【基本流程】

1、第一時間將當事人及可以佐證的人員找到辦公室。

2、做當事人心理安撫工作,為沖突雙方消氣。

3、盡可能通過各種渠道調查真相,要求當事人及佐證人員必須留書面材料并簽名。班主任(輔導員)跟學生強調,對于隱瞞真相的同學將加重懲處力度。

4、調查全部結束后,班主任(輔導員)決定進行相應的批評教育,決定是否約家長來校面談。(如果要約家長前來,事先不要告訴學生,跟家長提前打好招呼,家長到校后再找學生過來)

5、班主任(輔導員)將相關事實書面形式報告系里,由系里給出處分建議并報學生處。

6、根據具體情況,將處分情況通知或送達學生家長。

7、在批評教育的過程中,要做好學生的心理穩定工作,注意批評的方式和程度,不能過激。

五、學生常規違紀的處理;

【基本原則】堅持先調查、后處理。

【禁忌】過早說出處理意見。

【基本流程】

1、班主任先“禮”:班主任此時還是以“哄”為主,讓他們主動交代違紀事實,并寫出材料;班主任此時要站在學生立場,承諾處理時幫他們說話。

2、系里后“兵”:根據調查的情況,按照規定給出擬處分建議報學生處或教務處;

此時,班主任為學生做人情,幫助其求情。

3、處理結果及時通知或送達學生家長。

4、以合理的方式做好學生處理后的教育工作和善后工作。

六、怎么勸退犯大錯的問題學生;

【基本原則】勸退是“持久戰”,其根本讓家長和學生在時間的洗禮中心平氣和地接受學校退學。

【禁忌】操之過急,甚至以過激的手段威脅學生退學。

【基本流程】

1、盡可能提早找家長過來,以合理的方式表明學校勸其退學的態度,要注重強調退學對其本人有利;(記住:本次勸退是假勸,只為了表明一種態度)

2、本次家長一般都不會接受退學,班主任磨蹭一會后便假裝讓步,并站到家長一邊共同教育孩子。(常見的辦法是與家長配合,家長唱黑臉,班主任唱白臉,共同給學生施加壓力,這種配合是取得家長信任的過程。)

3、取得家長信任后,班主任要求家長寫下保證書,保證下次再犯將無條件退學。(班主任在過程中應表現出以一種無奈和痛惜,而不要表現出憤怒和不屑)

4、學生再次犯錯誤,就以保證書要求其正式退學。(如果家長此時實在不愿意,可再放一次機會,直至將其磨回家)

第四篇:學生管理系統學生鏈表

#include #include #include

typedef struct student { int num;char name[10];char passwd[6];int age;int class;int math;int clan;int chinese;int mingci;struct student *next;}STU,*pstu;

pstu stu_numsort(pstu head);pstu stu_sumsort(pstu head);pstu stu_mathsort(pstu head);pstu stu_chisort(pstu head);pstu stu_clansort(pstu head);pstu stu_searchbynum(pstu head,int num);pstu stu_searchbyname(pstu head,char name[]);pstu stu_searchbyclass(pstu head,int class);pstu stu_create(){

pstu head=NULL;pstu s=NULL;int num;char name[10];char passwd[6];int age;int class;int math;int clan;int chinese;int mingci;printf(“請輸入任意一個數非0的數繼續 :”);scanf(“%d”,&num);while(num!=0){

s=(pstu)malloc(sizeof(STU));

if(s==NULL)

{

printf(“nmalloc errorn”);

return NULL;

}

printf(“輸入學生學號:”);

scanf(“%d”,&s->num);

printf(“請輸入學生姓名:”);

scanf(“%s”,s->name);

printf(“請輸入登陸密碼:”);//學生權限(error)

scanf(“%s”,s->passwd);

printf(“請輸入學生年齡:”);

scanf(“%d”,&s->age);

printf(“請輸入學生班級:”);

scanf(“%d”,&s->class);

printf(“請輸入數學成績:”);

scanf(“%d”,&s->math);

printf(“請輸入c語言成績:”);

scanf(“%d”,&s->clan);

printf(“請輸入語文成績:”);

scanf(“%d”,&s->chinese);

printf(“enter next studentn”);

if(head==NULL)

{

s->next=NULL;

head=s;

}

else

{

s->next=NULL;

s->next=head;

head=s;

}

scanf(“%d”,&num);} return head;} //保存

void stu_write(pstu head){ int flag=0;FILE *fp=NULL;pstu p=head;fp=fopen(“num”,“w”);if(fp==NULL){

printf(“open errorn”);

return;} while(p!=NULL){

flag=fwrite(p,sizeof(STU),1,fp);

if(flag!=1)

{

printf(“write errorn”);

return;

}

p->next;} fclose(fp);} //讀函數

pstu stu_read(){ FILE *fp=NULL;pstu head=NULL;pstu s=NULL;fp=fopen(“num”,“r”);s=(pstu)malloc(sizeof(STU));while(fread(s,sizeof(STU),1,fp)==1){

if(head==NULL)

{

s->next=NULL;

head=s;

}

else

{

s->next=NULL;

s->next=head;

head=s;

}

s=(pstu)malloc(sizeof(STU));} fclose(fp);return head;} //刪除學生信息(學號)pstu stu_del(pstu head,int num){ pstu p=head;pstu q=NULL;printf(“輸入刪除的學號:”);scanf(“%d”,&num);if(head->num==num){

head=head->next;} else {

while(p->next!=NULL)

{

if(p->next->num==num)

{

q=p->next;

p->next=q->next;

free(q);

q=NULL;

break;

}

p=p->next;

} } return head;}

pstu stu_searchbynum();//按學號修改學生信息

void stu_changebynum(pstu head){ pstu p=head;int num;char name[10];char passwd[6];int age;int class;int math,chinese,clan;int n;printf(“請輸入查找的學號:”);scanf(“%d”,&num);while(p!=NULL){

if(p->num==num)

{

printf(“學號t姓名t密碼t年齡t班級t數學tc語言t語文t名次n”);

printf(“%dt%st%st%dt%dt%dt%dt%dt%dn”,p->num,p->name,p->passwd,p->age,p->class,p->math,p->clan,p->chinese,p->mingci);

break;

}

p=p->next;}

printf(“請選擇需要修改的學生信息:n”);printf(“-------------------------n”);printf(“1:姓名n”);printf(“2:密碼n”);printf(“3:年齡n”);printf(“4:班級n”);printf(“5:數學成績n”);printf(“6:c成績n”);printf(“7:語文成績n”);printf(“0:退出”);printf(“---------------------------n”);printf(“請輸入需要修改的信息:”);scanf(“%d”,&n);switch(n){

case 0:

return;

case 1:

printf(“請輸入新的姓名:”);

scanf(“%s”,p->name);

break;

case 2:

printf(“請輸入新的密碼:”);

scanf(“%s”,p->passwd);

break;

case 3:

printf(“請輸入新的年齡:”);

scanf(“%d”,&p->age);

break;

case 4:

printf(“請輸入新的班級:”);

scanf(“%d”,&p->class);

break;

case 5:

printf(“請輸入新的數學成績:”);

scanf(“%d”,&p->math);

break;

case 6:

printf(“請輸入新的c語言成績:”);

scanf(“%d”,&p->clan);

break;

case 7:

printf(“請輸入新的語文成績:”);

scanf(“%d”,&p->chinese);

break;

default:

printf(“n無效選項n”);

break;} printf(“修改成功!n”);printf(“學號t姓名t密碼t年齡t班級t數學tc語言t語文t名次n”);

printf(“%dt%st%st%dt%dt%dt%dt%dt%dn”,p->num,p->name,p->passwd,p->age,p->class,p->math,p->clan,p->chinese,p->mingci);} //按學生姓名修改

void stu_changebyname(pstu head){ pstu p=head;int num;char name[10];char passwd[6];int age;int class;int math,chinese,clan;int n;printf(“請輸入查找的姓名:”);scanf(“%s”,name);while(p!=NULL){

if(strcmp(p->name,name)==0)

{

printf(“學號t姓名t密碼t年齡t班級t數學tc語言t語文t名次n”);

printf(“%dt%st%st%dt%dt%dt%dt%dt%dn”,p->num,p->name,p->passwd,p->age,p->class,p->math,p->clan,p->chinese,p->mingci);

break;} p=p->next;} printf(“請選擇需要修改的學生信息:n”);printf(“-------------------------n”);printf(“1:學號n”);printf(“2:密碼n”);printf(“3:年齡n”);printf(“4:班級n”);printf(“5:數學成績n”);printf(“6:c成績n”);printf(“7:語文成績n”);printf(“0:退出”);printf(“---------------------------n”);printf(“請輸入需要修改的信息:”);scanf(“%d”,&n);switch(n){ case 0:

return;case 1:

printf(“請輸入新的學號:”);

scanf(“%d”,&p->num);

break;case 2:

printf(“請輸入新的密碼:”);

scanf(“%s”,p->passwd);

break;case 3:

printf(“請輸入新的年齡:”);

scanf(“%d”,&p->age);

break;case 4:

printf(“請輸入新的班級:”);

scanf(“%d”,&p->class);

break;case 5:

printf(“請輸入新的數學成績:”);

scanf(“%d”,&p->math);

break;case 6:

printf(“請輸入新的c語言成績:”);

scanf(“%d”,&p->clan);

break;

case 7:

printf(“請輸入新的語文成績:”);

scanf(“%d”,&p->chinese);

break;

default:

printf(“n無效選項n”);

break;} printf(“修改成功!n”);printf(“學號t姓名t密碼t年齡t班級t數學tc語言t語文t名次n”);

printf(“%dt%st%st%dt%dt%dt%dt%dt%dn”,p->num,p->name,p->passwd,p->age,p->class,p->math,p->clan,p->chinese,p->mingci);

} void change_printf(pstu head){ pstu p=head;int n;printf(“請選擇修改學生信息的方式:n”);printf(“-------n”);printf(“1:按學生學號修改n”);printf(“2:按學生姓名修改n”);printf(“0:退出n”);printf(“---------n”);scanf(“%d”,&n);switch(n){

case 1:

stu_changebynum(head);

printf(“顯示全部學生信息:”);

break;

case 2:

stu_changebyname(head);

printf(“顯示全部學生信息:”);

break;

case 3:

return;} } //查找學生信息

void search_printf(pstu head){ pstu p=head;int n;int num;char name[10];int class;printf(“請選擇查找學生信息的方式:n”);printf(“-------n”);printf(“1:按學生學號查找n”);printf(“2:按學生姓名查找n”);printf(“3:按班級群體查找n”);printf(“0:退出n”);printf(“---------n”);scanf(“%d”,&n);switch(n){

case 1:

stu_searchbynum(head,num);

break;

case 2:

stu_searchbyname(head,name);

break;

case 3:

stu_searchbyclass(head,class);

break;

case 0:

return;} } //1:學號查找

pstu stu_searchbynum(pstu head,int num){ pstu p=head;printf(“請輸入查找的學號:”);scanf(“%d”,&num);while(p!=NULL){

if(p->num==num)

break;

p=p->next;} return p;} //2:按姓名查找 pstu stu_searchbyname(pstu head,char name[]){ pstu p=head;printf(“請輸入要查找的姓名:”);scanf(“%s”,name);while(p!=NULL){

if(strcmp(name,p->name)==0)

break;

p=p->next;} return p;} //班級群體查找

pstu stu_searchbyclass(pstu head,int class){ pstu p=head;printf(“請輸入要查找的班級:”);scanf(“%d”,&class);while(p!=NULL){

if(p->class==class)

break;

p=p->next;} return p;}

//顯示所有學生信息列表

void sort_printf(pstu head){ pstu p=head;int n;printf(“請選擇顯示學生信息的方式:n”);printf(“-----n”);printf(“1:按學號順序顯示n”);printf(“2:按名次顯示n”);printf(“3:按數學成績顯示n”);printf(“4:按c語言成績顯示n”);printf(“5:按語文成績顯示n”);printf(“--------n”);printf(“請輸入你要選擇的操作:”);scanf(“%d”,&n);switch(n){

case 1:

stu_numsort(head);

printf(“顯示學生信息n”);

break;

case 2:

stu_sumsort(head);

printf(“顯示學生信息n”);

break;

case 3:

stu_mathsort(head);

printf(“顯示學生信息n”);

break;

case 4:

stu_clansort(head);

printf(“顯示學生信息n”);

break;

case 5:

stu_chisort(head);

printf(“顯示學生信息n”);

break;

case 6:

return;

default:

printf(“輸入錯誤n”);

break;} }

int stu_len(pstu head){ pstu p=head;int len=0;while(p!=NULL){

len++;

p=p->next;} return len;} //1:按學號順序顯示

pstu getnummax(pstu head){ pstu pmax=head;if(head==NULL){

return NULL;} pstu p=head->next;while(p!=NULL){

if(pmax->num

num)

{

pmax=p;

}

p=p->next;} return pmax;} pstu removefromold(pstu head,pstu pmax){ pstu p=head;if(head==pmax){

head=head->next;} else {

while(p!=NULL)

{

if(p->next==pmax)

{

p->next=pmax->next;

break;

}

}

p=p->next;} return head;} pstu add(pstu pnew,pstu pmax){ pmax->next=pnew;pnew=pmax;return pnew;} pstu stu_numsort(pstu head){ pstu pold=head;pstu pmax=NULL;pstu pnew=NULL;while(pold!=NULL){

pmax=getnummax(pold);

pold=removefromold(pold,pmax);

pnew=add(pnew,pmax);} return pnew;} //按名次顯示

pstu getsummin(pstu head){ pstu pmin=head;if(head==NULL){

return NULL;} pstu p=head->next;while(p!=NULL){

if(pmin->math+pmin->clan+pmin->chinese>p->math+p->clan+p->chinese)

{

pmin=p;

}

p=p->next;} return pmin;} pstu removefromtold(pstu head,pstu pmin){ pstu p=head;if(head==pmin){

head=head->next;} else {

while(p!=NULL)

{

if(p->next==pmin)

p->next=pmin->next;

break;

}

p=p->next;} return head;} pstu addt(pstu pnew,pstu pmin){ pmin->next=pnew;pnew=pmin;return pnew;} pstu stu_sumsort(pstu head){ pstu pold=head;pstu pmin=NULL;pstu pnew=NULL;int i=stu_len(head);while(pold!=NULL){

pmin=getsummin(pold);

pold=removefromtold(pold,pmin);

pnew=addt(pnew,pmin);

pnew->mingci=i--;} return pnew;} //按數學成績顯示

pstu getmathmin(pstu head){ pstu pmin=head;if(head==NULL){

return NULL;} pstu p=head->next;while(p!=NULL){

if(pmin->math>p->math)

{

pmin=p;

}

p=p->next;} return pmin;} pstu stu_mathsort(pstu head){ int i=stu_len(head);pstu pold=head;pstu pmin=NULL;pstu pnew=NULL;while(pold!=NULL){

pmin=getmathmin(pold);

pold=removefromold(pold,pmin);

pnew=add(pnew,pmin);

pnew->mingci=i--;} return pnew;} //按c語言成績顯示

pstu getclanmin(pstu head){ pstu pmin=head;if(head==NULL){

return NULL;} pstu p=head->next;while(p!=NULL){

if(pmin->clan>p->clan)

{

pmin=p;

}

p=p->next;} return pmin;} pstu stu_clansort(pstu head){ int i=stu_len(head);pstu pold=head;pstu pmin=NULL;pstu pnew=NULL;while(pold!=NULL){

pmin=getclanmin(pold);

pold=removefromtold(pold,pmin);

pnew=addt(pnew,pmin);

pnew->mingci=i--;} return pnew;} //按語文成績顯示

pstu getchimin(pstu head){ pstu pmin=head;if(head==NULL){

return NULL;} pstu p=head->next;while(p!=NULL){

if(pmin->chinese>p->chinese)

{

pmin=p;

}

p=p->next;} return pmin;} pstu stu_chisort(pstu head){ int i=stu_len(head);pstu pold=head;pstu pmin=NULL;pstu pnew=NULL;while(pold!=NULL){

pmin=getchimin(pold);

pold=removefromtold(pold,pmin);

pnew=addt(pnew,pmin);

pnew->mingci=i--;} return pnew;} void stu_printf(pstu head){ pstu tmp=head;printf(“學號t姓名t密碼t年齡t班級t數學tc語言t語文t名次n”);while(tmp!=NULL){

printf(“%dt%st%st%dt%dt%dt%dt%dt%dn”,tmp->num,tmp->name,tmp->passwd,tmp->age,tmp->class,tmp->math,tmp->clan,tmp->chinese,tmp->mingci);

tmp=tmp->next;} printf(“n”);} void stun_printf(pstu head){ pstu tmp=head;printf(“學號t姓名t密碼t年齡t班級t數學tc語言t語文t名次n”);while(tmp!=NULL){

printf(“%dt%st%st%dt%dt%dt%dt%dt%dn”,tmp->num,tmp->name,tmp->passwd,tmp->age,tmp->class,tmp->math,tmp->clan,tmp->chinese,tmp->mingci);

break;} printf(“n”);}

//2: int main(){ // int m;int num;int class;int len;char name[10];pstu head=stu_create();stu_printf(head);len=stu_len(head);// pstu p=stu_del(head, num);// stu_printf(p);/* pstu k=stu_searchbynum(head,num);if(k!=NULL)

stun_printf(k);else

printf(“no find”);

pstu l=stu_searchbyname(head,name);

// // // // // //

// // // // // //

} if(l!=NULL)stun_printf(l);else printf(“no find”);pstu h=stu_searchbyclass(head,class);if(h!=NULL)stun_printf(h);else printf(“no find”);*/ stu_changebynum(head);printf(“顯示全部學生信息:”);stu_printf(head);stu_changebyname(head);printf(“顯示全部學生信息:”);stu_printf(head);search_printf(head);stun_printf(head);change_printf(head);stu_printf(head);pstu p1=stu_numsort(head);stu_printf(p1);pstu p2=stu_sumsort(head);stu_printf(p2);pstu p3=stu_mathsort(head);stu_printf(p3);sort_printf(head);stu_printf(head);

第五篇:學生管理系統論文

學生管理系統的設計

楊世坤 計算機科學與技術系 09級 0940141022

摘要:在 VB2008 環境下,通過連接 Access2000 數據庫,建立了一個學生管理系統。在這個系統里,可以實現學生學生的學號,姓名,性別,民族,年級,出生年月,系別,家庭住址等各種信息的錄入,精確查找,模糊查找,更新,刪除等操作。從程序的界面設計到源代碼,都做了詳盡的說明,適合初學者快速掌握信息管理系統開發的步驟。關鍵詞:VB;數據庫;管理系統;access;查詢

Abstract: It is designed for the establishment of student information managementsystem in vb6.0 by connecting Access2000 database.This system can realize Information Processing including data entry, query, update, delete and so on.The Information means the student's number,name,age, contact.From the interface design to the source code, it has shown a detailed description, which suitable for beginners tomaster the designing of system quickly.Key words: vb;database;system of management;access;query 1 引言

隨著學校辦學規模的擴大,學生數量急劇增加,有關學生各種信息的數量也在成倍增長。面對龐大的信息量,利用計算機信息管理系統對學生的學號,姓名,性別,民族,年級,出生年月,系別,家庭住址等綜合信息進行管理經成為一種必然趨勢。我根據學校特點,通過開發學生信息管理系統,可以做到信息的規范管理、科學統計和快速查詢,從而解決大量繁瑣的工作,實現學生信息管理的辦公無紙化和高效化。功能需求分析

學生管理系統采用 Visual Basic 2008 作為開發工具,后臺數據庫采用 Assecc2000。系統開發的總體任務是實現學生信息管理的條理化,系統化。用戶通過界面,完成對學生的學號,姓名,性別,民族,年級,出生年月,系別,家庭住址等信息的管理。可以對學生信息方便的實現輸入,刪除,修改,模糊查詢,精確查詢,在瀏覽記錄時可以切換上一條,下一條,第一條和最后一條。還可對學生信息記錄進行排序。數據庫建立與連接

3.1 數據庫建立

目前,可應用的數據庫開發工作很多,Oracle是面向網絡計算的數據庫,適合開發大型網絡應用軟件;Access和Visual Foxpro系統適合開發小型數據庫應用軟件。Access數據庫功能比較齊全,數據的備份、拷貝都很方便,且程序發布時不需要額外安裝其他的數據庫管理軟件。本系統數據量較小,采用Access數據庫就可滿足要求。

3.2 數據庫連接

VB 提供了多種與數據庫連接的方式,這里使用數據控件(Data)。數據控件(Data)提供 了一種方便地訪問數據庫中數據的方法,使用數據控件無須編寫代碼就可以對 VB 所支持 的各種類型的數據庫執行大部分數據訪問操作。數據控件本身不能顯示和直接修改記錄,但是可以通過與數據控件相關聯的數據約束控件中顯示各個記錄。用戶界面設計 在 Visual Basic2008 環境中,建立一個標準的 exe 工程。學生的學號,姓名,性別,民族,年級,出生年月,系別,家庭住址用文本框控件來顯示,名稱分別為 text1,text2…text8, 他們分別與數據庫中的相應字段綁定。

選擇數據控件 data1,并設置它的屬性,使得它與數據庫連接。實現記錄的第一條,上一條,下一條,最后一條的切換以及添加記錄,刪除記錄和編輯記錄的操作用按鈕來控制實現,名稱分別為 command1,command2…command7。對按不同的條件進行查詢,這里使用了組合框 Combo1 和 Combo2,分別用來選擇精確查找和模糊查找的條件。代碼

程序的實現主要使用了 data 控件的常用方法。對于精確查找和模糊查找中的“查找第一個”與“查找下一個”按鈕的事件中,它

們所使用的查找條件是一樣的,所以需要先定義窗體變量。5.1 登陸界面

mystr = “Provider=Microsoft.Jet.OLEDB.4.0;Data source=student.mdb”

myconn.ConnectionString = mystr

myconn.Open()

Dim mycmd As New OleDbCommand

mycmd.Connection = myconn

mycmd.CommandText = “select * from admin”

Dim myreader As OleDbDataReader = mycmd.ExecuteReader

While myreader.Read()

If TextBox1.Text = myreader(“ID”).ToString And TextBox2.Text = myreader(“psw”)Then

MsgBox(“用戶名密碼正確!!”, MsgBoxStyle.Information, “提示”)

Module1.password = TextBox2.Text

Module1.username = TextBox1.Text

Module1.pright = myreader(“pright”)

Form1.Show()

Me.Hide()

Exit Sub

End If

End While

MsgBox(“用戶密碼不正確”, MsgBoxStyle.Information, “提示”)

TextBox1.Text = “"

TextBox2.Text = ”“

TextBox1.Focus()5.2 添加刪除用戶

在實際應用中,除了超級用戶之外,往往會賦予用戶一定的訪問權限,在給用戶設置訪問權限之前,應先創建一個用戶帳戶,將其追加到用于當前數據庫的工作組信息文件中的默認Users組。本系統的安全措施在數據庫的訪問過程中雖然起到了一定的防護作用,然而,盡管人們想到了種種辦法維護自己的數據安全,但也總是有漏洞被發現,因此,備份數據是簡單有效的方法。5.2 記錄的跳轉 查找首記錄 mybs.MoveFirst()

Label9.Text = ”共有“ & mybs.Count & ”條記錄,“ & ”本記錄為第“ & mybs.Position + 1 & ”條記錄“ 查找下一條記錄

If mybs.Position <> mybs.Count-1 Then

mybs.MoveNext()

Label9.Text = ”共有“ & mybs.Count & ”條記錄,“ & ”本記錄為第“ & mybs.Position + 1 & ”條記錄“

Else

MsgBox(”已經是最后一條記錄“, MsgBoxStyle.Information, ”提示“)

End If 查找上一條記錄 If mybs.Position <> 0 Then

mybs.MovePrevious()

Label9.Text = ”共有“ & mybs.Count & ”條記錄,“ & ”本記錄為第“ & mybs.Position + 1 & ”條記錄“

Else

MsgBox(”已經是第一條記錄“, MsgBoxStyle.Information, ”提示“)

End If 查找末記錄 mybs.MoveLast()

Label9.Text = ”共有“ & mybs.Count & ”條記錄,“ & ”本記錄為第“ & mybs.Position + 1 & ”條記錄“ 5.3 記錄的修改、刪除、添加、保存

記錄的修改

a = 3

Button5.Enabled = False

Button6.Enabled = False

Button8.Enabled = True

Button7.Enabled = False

GroupBox2.Enabled = False 記錄的刪除

a = 1

Button5.Enabled = False

Button6.Enabled = False

Button8.Enabled = True

Button7.Enabled = False

GroupBox2.Enabled = False 記錄的添加

a = 2

TextBox1.Text = ”“

TextBox2.Text = ”“

TextBox3.Text = ”“

TextBox4.Text = ”“

TextBox5.Text = ”“

TextBox6.Text = ”“

TextBox7.Text = ”“

TextBox8.Text = ”“

TextBox1.Focus()

Button5.Enabled = False

Button6.Enabled = False

Button8.Enabled = True

Button7.Enabled = False

GroupBox2.Enabled = False 記錄的保存

Select Case a

Case 1

If MsgBox(”您確定刪除此條記錄嗎?“, MsgBoxStyle.Question + MsgBoxStyle.YesNo, ”提示“)= MsgBoxResult.Yes Then

myds.Tables(”info“).Rows(mybs.Position).Delete()

Dim mybd = New OleDbCommandBuilder(myada)

myada.Update(myds, ”info“)

myds.Clear()

myada.Fill(myds, ”info“)

GroupBox2.Enabled = True

Button5.Enabled = True

Button6.Enabled = True

Button7.Enabled = True

Button8.Enabled = False

Else

GroupBox2.Enabled = True

Button5.Enabled = True

Button6.Enabled = True

Button7.Enabled = True

Button8.Enabled = False

End If

Case 2

Dim myrow As DataRow = myds.Tables(”info“).NewRow

myrow(”學號“)= TextBox1.Text

myrow(”姓名“)= TextBox2.Text

myrow(”性別“)= TextBox3.Text

myrow(”民族“)= TextBox4.Text

myrow(”年級“)= TextBox5.Text

myrow(”出生年月“)= TextBox6.Text

myrow(”系“)= TextBox7.Text

myrow(”家庭住址“)= TextBox8.Text

myds.Tables(”info“).Rows.Add(myrow)

GroupBox2.Enabled = True

Dim mybd = New OleDbCommandBuilder(myada)

myada.Update(myds, ”info“)

myds.Clear()

myada.Fill(myds, ”info“)

Button5.Enabled = True

Button6.Enabled = True

Button7.Enabled = True

Button8.Enabled = False

Case 3

myds.Tables(”info“).Rows(mybs.Position).BeginEdit()

myds.Tables(”info“).Rows(mybs.Position).EndEdit()

Dim mybd = New OleDbCommandBuilder(myada)

myada.Update(myds, ”info“)

myds.Clear()

myada.Fill(myds, ”info“)

GroupBox2.Enabled = True

Button5.Enabled = True

Button6.Enabled = True

Button7.Enabled = True

Button8.Enabled = False

End Select

Label9.Text = ”共有“ & mybs.Count & ”條記錄,“ & ”本記錄為第“ & mybs.Position + 1 & ”條記錄“

End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles Button6.Click

a = 1

Button5.Enabled = False

Button6.Enabled = False

Button8.Enabled = True

Button7.Enabled = False

GroupBox2.Enabled = False 5.4 記錄的查找 Dim condstr As String

condstr=”“

If TextBox1.Text <> ”“ Then

If condstr = ”“ Then

If ComboBox1.Text = ”等于“ Then

condstr = ”姓名='“ & TextBox1.Text & ”'“

Else

condstr = ”姓名 like '%“ & TextBox1.Text & ”%'“

End If

End If

End If

If TextBox2.Text <> ”“ Then

If condstr = ”“ Then

condstr = ”性別='“ & TextBox2.Text & ”'“

Else

condstr = condstr & ” and “ & ”性別='“ & TextBox2.Text & ”'“

End If

End If

If TextBox3.Text <> ”“ Then

If condstr = ”“ Then

condstr = ”民族='“ & TextBox2.Text & ”'“

Else

condstr = condstr & ” and “ & ”民族='“ & TextBox2.Text & ”'“

End If

End If

If TextBox4.Text <> ”“ Then

If condstr = ”“ Then

If ComboBox2.Text = ”等于“ Then

condstr = ”家庭住址='“ & TextBox4.Text & ”'“

Else

condstr = condstr & ” and “ & ”家庭住址 like '%“ & TextBox4.Text & ”%'"

End If

End If

End If

mydv.RowFilter = condstr 6 結束語

本系統達到了預期的要求,系統設計是根據學校的學生信息管理流程,合理設置各種操作模塊,各管理員和操作員之間分工明確,并且能夠及時、準確地記錄每次操作信息。操作簡單易行,定期審核,確保了數據的正確性。從根本上解決了學生管理的計算機實現方式,對學校管理來講是一個大的跨越。

參考文獻:鄭阿奇 彭作民 Visual Basic.NET 程序設計教程(第二版)械工業出版社

下載學生管理系統main方法word格式文檔
下載學生管理系統main方法.doc
將本文檔下載到自己電腦,方便修改和收藏,請勿使用迅雷等下載。
點此處下載文檔

文檔為doc格式


聲明:本文內容由互聯網用戶自發貢獻自行上傳,本網站不擁有所有權,未作人工編輯處理,也不承擔相關法律責任。如果您發現有涉嫌版權的內容,歡迎發送郵件至:645879355@qq.com 進行舉報,并提供相關證據,工作人員會在5個工作日內聯系你,一經查實,本站將立刻刪除涉嫌侵權內容。

相關范文推薦

    學生管理系統使用說明

    學生系統使用說明 登錄 在瀏覽器地址欄內輸入“202.195.128.108”后點擊回車,彈出蘇大研究生管理系統登錄窗口。如圖1所示。 圖1 在圖一所示窗口輸入用戶名、密碼、驗證碼等......

    學生通訊錄管理系統

    “學生通訊信息記錄系統”的設計與實現 一、設計要求 1. 問題的描述 “學生通訊信息記錄系統”是為了實現快速的對學生信息進行錄入、刪除、查找、顯示。各個功能靠函數實現......

    學生籍貫管理系統

    #include "stdafx.h" #include "stdio.h" #include "stdlib.h" #include "conio.h" #include "math.h" #include "string.h" /**********************建立鏈表************......

    學生考勤管理系統

    學生考勤管理系統系統設計開發:張文聰網站意義:學生考勤對學校教務管理是至關重要的,傳統的學生出勤檢查往往是教師拿著一張紙質名單逐一點名,或讓學生上交課堂作業以便課后查......

    學生管理系統實驗報告

    數據庫課程設計報告-----學生管理系統一、需求分析根據老師的要求,我主要把精力集中在學生選課的功能實現上,角色分為管理員與學生 實現功能包括如下兩部分:A.學生端實現功能:1.系......

    學生成績管理系統

    //*學生成績管理系統*// #include #define N 3 struct student { int no; char name[20]; float english; float computer; float math; float average; }; void getclass(s......

    學生素質評價的系統方法

    學生素質評價的系統方法 ——怎樣給學生寫評語 怎樣改進學生的學習方法 四川省社會科學院查有梁 一、問題的提出 ? 每一學年結束后,學校要給家長正式發送學生的《成績通知書》......

    關于管理學生的方法5

    關于管理學生的方法5 我參加工作22年,擔任班主任至今已有19個年頭。我經常思考這樣一個問題:什么樣的班主任最受學生歡迎甚至愛戴呢?每屆學生,我都做過了解:大多學生喜歡既懂教學......

主站蜘蛛池模板: 精品人妻中文字幕有码在线| 性少妇无码播放| 97精品尹人久久大香线蕉| 国产精品高潮呻吟av久久软件| 最新国产麻豆aⅴ精品无码| 少妇又紧又色又爽又刺激视频| 夜爽8888视频在线观看| 看黄a大片日本真人视频直播| 无限看片在线版免费视频大全| 最新69国产成人精品视频| 性高朝久久久久久久| 7777欧美成是人在线观看| 国语少妇高潮对白在线| 九色综合九色综合色鬼| 99无码熟妇丰满人妻啪啪| 狠狠噜天天噜日日噜视频麻豆| 精品国产美女福利在线不卡| 久久性色欲av免费精品观看| 夜夜爽妓女8888视频免费观看| 国产亚洲精品久久久闺蜜| 亚洲经典三级| 免费无码成人av电影在线播放| 无码国产玉足脚交极品网站| 超清精品丝袜国产自在线拍| 免费人妻无码不卡中文视频| 国产精品久久久久久久久电影网| 在线精品亚洲一区二区小说| 亚洲午夜精品久久久久久浪潮| 中文在线天堂网www| 无码小电影在线观看网站免费| 国产麻豆精品一区二区三区v视界| 国产国拍亚洲精品永久软件| 高潮爽死抽搐白浆gif视频| 国产精品卡一卡二卡三| 亚洲国产美女精品久久久久∴| 一卡二卡三卡视频| 亚洲精品无码久久久久y| 日韩av高清无码| 粗大猛烈进出高潮视频| 精品国产一二三产品区别在哪| 久久久久久精品色费色费s|