學生成績管理系統源代碼_第1頁
學生成績管理系統源代碼_第2頁
學生成績管理系統源代碼_第3頁
學生成績管理系統源代碼_第4頁
學生成績管理系統源代碼_第5頁
免費預覽已結束,剩余20頁可下載查看

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、二,n®w一(論 5y 西白學生成績管理系統|二、本次課程設計(論文)應達到的目的|I通過數據庫大作業課程設計的操作與實踐,使學生了解關系數據庫的相|關理論知識和有關工具軟件的使用技巧,在一定程度上提高應用程序的綜|合開發能力和創新意識、創新能力。|三、本次課程設計(論文)任務的主要內容和要求(包括原始數據、技術i|參數、設計要求等)|I系統功能基本要求:I|1.學生信息維護;|2.教師信息維護;|I3.課程信息維護;I|4.學生選課信息;|:5. 任課教師操作課程成績;|6.學生查詢課程成績。|四、應收集的資料及主要參考文獻:|1.數據庫:原理編程與性能(影印版)(第2版),高等教

2、育出版社,|P Parick O'Neil, Elizabeth O'Neil 編著,2005.7;1|2.數據庫系統概論(第4版),高等教育出版社,王珊,薩師燎編著,|2 2006.05;IJ7I五、審核批準意見教研室主任(簽字)這次課設我做的是學生成績管理系統,本系統依據開發要求主要針對于教育系統,完成對日常的教育工作對學生成績檔案及其他信息的數字化管理。開發本系統可使學院教職員工減輕工作 壓力,比較系統地對教務、教學上的各項服務和信息進行管理, 同時,可以減少勞動力的使用,加快查詢速度、加強管理,使各 項管理更加規范化。現在在各大中小學校,用計算機管理學校的信息已經越來越

3、 普遍了。用計算機不但可以提高工作效率,而且還節省了許多人 力物力,增強了學校資料的安全性。提高了學校的管理能力,為 此,用計算機來管理學校的信息,是非常必要的。目前,學校工作繁雜、資料重多,目前還沒有一套完整的、 統一的系統。因此,開發一套適和大眾的、兼容性好的系統是很 有必要的,但由于知識積累及時間關系,這次課設我所設計的系 統不是很完善,有些地方沒有考慮到,所以實用性大打折扣,后 面有時間將會將系統設計的全面些,更具有實用性。在這次課設的開發過程中,我注意使其符合軟件工程的設計 的要求,在之前準備了許多時間來設計表結構,并將各個模塊的 流程畫出來,使系統的各個模塊功能完善,并力求系統應具

4、有實 用性、可靠性和適用性方便用戶的操作,盡量減少用戶的操作, 并且能夠對查詢結果進行分類匯總,該系統還有許多不盡如人意 的地方,比如用戶界面不夠美觀,對于出錯處理不夠等多方面問 題,這些都有待進一步改善。精選目錄設計目的1需求分析 6概要設計 7配置數據源11詳細設計13設計總結22參考文獻23C 語言程序課程設計學生成績管理系統一設計目的通過數據庫大作業課程設計的操作與實踐, 使學生了解關系數據庫的相關理論知識和有關工具軟件的使用技巧, 在一定程度上提高應用程序的綜合開發能力和創新意識、創新能力。二問題描述系統功能基本要求:1 學生信息維護;2 教師信息維護;3 . 課程信息維護;4 學生

5、選課信息;5 .任課教師操作課程成績;6 . 學生查詢課程成績。3 .需求分析“學生成績管理信息系統”包括四個模塊: 成績錄入、 班級統計、 年級統計、系統功能。 這四個模塊既相互聯系又相互獨立, 班級統計、 年級統計模塊必須以 成績錄入為基礎。(1) 成績錄入模塊: 主要功能用來對學生的成績進行收集和修改。 具體包括學生成績錄入、修改、增加、刪除、查詢等功能,成績錄入需要分班級、分年級以及某個時間考試的各門功課的成績。 修改要與成績錄入相對應。 增加、 刪除是 對基本表的操作。查詢條件設置應該齊全,可以班級查詢,年級查詢,也可以姓名查詢,學號查詢等等。(2) 班級統計模塊:主要功能用來對學生

6、的成績以班級為單位進行處理。 具體包括各班學生總成績、 平均成績、 班級排名及統計班級某分數段內的學生人數; 各個學生該科成績、班級排名及統計班級某分數段內的學生人數。各項統計僅對于某學期某次考 試而言。(3)年級統計模塊:主要功能用來對學生的成績以年級為單位進行處理。具體包括各年級學生總成績、年級排名統計年級某分數段內的學生人數;各個學生該科成績、年級排名及統計、年級某分數段內的學生人數。各項統計僅對于某學期某次考試而言, 在統計時,還應注意各年級考試科目不同。(4)系統功能模塊:關于系統及退出系統。4 .概要設計在概要設計里,根據系統需求設計系統 EI圖,程序流圖,系統功能模塊圖 等信息,

7、并配置了數據源。圖1系統EI圖字斗圖2學生信息精選查詢圖4查詢模塊流程圖圖5班級與學生成績流圖(一)、系統的功能分析該學生成績管理系統是基于網絡在線的學生成績管理系統,在系統中分為大 的兩個方面:一是教師登錄頁面、二是學生登錄頁面。(1)教師進入學生成績管理系統的主要功能是:實現添加用戶、添加成績、學籍信息修改、修改密碼、查詢課程、選課、查詢成績、學籍信息查詢、打印等 基本功能。(2)學生進行學生成績管量系統的主要功能是:實現修改密碼、查詢課程、選課、查詢成績、學籍信息查詢、打印等基本功能。(二)、系統功能模塊圖添加用戶添加成績信息修改修改密碼查詢課程查詢成績信息查詢退出系統圖6教師功能模塊圖

8、教師在學生成績管理系統中能夠對所有學生的成績查看, 對學生按學號進行 精確查詢、按學生姓名進行模糊查詢,可以修改自己的登錄密碼,添加用戶,添 加學生的成績,打印學生的學籍信息。退出系統圖7學生功能模塊學生在系統中的基本功能是對自己所有成績的查詢,課程的查詢,個人登錄密碼的修改,基本信息的查看,選課,打印自己的學籍信息。七.代碼#include <stdio.h>#include <string.h>#include <stdlib.h>#include <windows.h>struct student 結構體定義int num;char nam

9、e10;char birthday10;int Cyuyan;int shujujiegou;struct student *next;;struct student *creat_by_input();struct student *get_last_student(struct student *head);struct student *Print_menu_main() 主菜單printf("*、c printf("| 1輸入學生信息|n");printf("|2輸出學生信息|n");printf("|3查找學生信息|n&qu

10、ot;);printf("|4修改學生信息|n");printf("|5插入學生信息|n");printf("|6刪除學生信息|n");printf("|7排序學生信息|n");printf("|0退出系統|n");printf("|n");struct student *print_table_head()printf("+n");printf("| 學號 | 姓名 |出生日期| c成績|數據結構成績|n");printf("

11、;+n");struct student *print_table_row(struct student *p)printf("|%10d|%10s|%10s|%10d|%10d|n",p->num,p->name,p->birthday,p->Cyuyan,p->shuju jiegou);void print_table_bottom() printf("+n");struct student * Creat_stu_record() / 建立鏈表struct student *plaststu=NULL,*p

12、newstu;char continue_input='N'struct student *head=NULL;while(1)if(head=NULL)head=creat_by_input();print_table_head();print_table_row(head);print_table_bottom();else pnewstu=creat_by_input();print_table_head();print_table_row(pnewstu);print_table_bottom();plaststu=get_last_student(head);plas

13、tstu->next=pnewstu;printf(" 是否繼續輸入學生信息? (Y 繼續, N 返回菜單 )n");getchar();continue_input=getchar();if(continue_input='n'|continue_input='N')system("cls");Print_menu_main();break;return head;struct student *creat_by_input()struct student *pnewstu=(struct student *)ma

14、lloc(sizeof(struct student);printf(" 請輸入學生信息n");printf(" 學號:");scanf("%d",&pnewstu->num);printf(" 姓名:");scanf("%s",pnewstu->name);printf(" 出生年月 :");scanf("%s",pnewstu->birthday);printf(" 請輸入學生成績n");printf(&q

15、uot;C 語言 :");scanf("%d",&(pnewstu->Cyuyan);printf(" 數據結構 :");scanf("%d",&(pnewstu->shujujiegou);pnewstu->next=NULL;return pnewstu;struct student *get_last_student(struct student *p )if(p->next=NULL)return p;elsereturn get_last_student(p->next

16、);void Print_Stu_Doc(struct student *head)struct student *p; char r;print_table_head();if(head=NULL)printf("n No Recordsn");for(p=head;p;p=p->next)printf("|%10d|%10s|%10s|%10d|%10d|n",p->num,p->name,p->birthday,p->Cyuyan,p->shuju jiegou);printf("+n");p

17、rintf("( 按 Enter 鍵返回主菜單)n");getchar();r=getchar();if(r!='1')system("cls");Print_menu_main();elsesystem("cls");Print_menu_main();struct student *search_by_name(struct student *head)/ 按姓名查找char name10;struct student *p=head;char continue_input;/*int isfound=0;*/pr

18、intf(" 請輸入要查找的姓名: ");scanf("%s",name);printf(" 查找 %sn",name);print_table_head();while(p!=NULL)if(strcmp(p->name,name)=0)print_table_row(p);p=p->next;/* isfound=1; */ break;p=p->next;print_table_bottom();printf(" 是否繼續查找?(Y 繼續; N 返回主菜單)n");getchar();con

19、tinue_input=getchar();if(continue_input='n'|continue_input='N')system("cls");Print_menu_main();elsesearch_by_name(head);struct student * search_by_id(struct student *head)/ 按學號查找int id;struct student *p=head;char continue_input;/*int isfound=0;*/printf(" 請輸入要查找的學號: &qu

20、ot;);scanf("%d",&id);printf(" 查找 %dn",id);print_table_head();while(p!=NULL)if(p->num=id)print_table_row(p);p=p->next;/*isfound=1;*/ break;p=p->next;print_table_bottom();printf(" 是否繼續查找? (Y 繼續; N 返回主菜單)n");getchar();continue_input=getchar();if(continue_input

21、='n'|continue_input='N') system("cls");Print_menu_main();elsesearch_by_id(head);return head;struct student*modify_record_by_id(struct student*head)/ 按學號修改 struct student *p=head;int id;char continue_input;printf(" 請輸入要修改的學生的學號: n");scanf("%d",&id);wh

22、ile(p!=NULL) if(p->num=id)break;p=p->next;if(p=NULL)printf(" 抱歉,沒有學號為 %d 的學生 n",id);elseprintf(" 請輸入學生信息:n");printf(" 學號:");scanf("%d",&(p->num);printf(" 姓名:");scanf("%s",&(p->name);printf(" 出生年月 :");scanf(&quo

23、t;%s",&(p->birthday);printf(" 請輸入學生成績: n");printf("C 語言 :");scanf("%d",&(p->Cyuyan);printf(" 數據結構 :");scanf("%d",&(p->shujujiegou);print_table_head();print_table_row(p);print_table_bottom();printf(" 繼續修改學生信息嗎?Y 繼續; N 返回

24、主菜單n");getchar();continue_input=getchar();if(continue_input='y'|continue_input='Y') creat_by_input();elsesystem("cls");Print_menu_main();return head;struct student*modify_record_by_name(struct student*head)/ 按姓名修改struct student*p=head;char name10;char continue_input;pr

25、intf(" 請輸入要修改的學生的姓名: n");scanf("%s",name);while(p!=NULL)if(strcmp(p->name,name)=0) break;p=p->next;if(p=NULL)printf(" 抱歉,沒有姓名為 %s 的學生 n",name);elseprintf(" 請輸入學生信息:n");printf(" 學號:");scanf("%d",&(p->num);printf(" 姓名:"

26、);scanf("%s",&(p->name);printf(" 出生年月 :");scanf("%s",&(p->birthday);printf(" 請輸入學生成績: n");printf("C 語言 :");scanf("%d",&(p->Cyuyan);printf(" 數據結構 :");scanf("%d",&(p->shujujiegou);print_table_he

27、ad();print_table_row(p);print_table_bottom(); printf(" 繼續修改學生信息嗎?Y 繼續; N 返回主菜單n");getchar();continue_input=getchar();if(continue_input='y'|continue_input='Y') creat_by_input();elsesystem("cls");Print_menu_main();return head;struct student *insert_record(struct stu

28、dent *head)/ 插入struct student *ptr1;struct student *ptr,*stud;struct student *ptr2=head;char continue_input='N'int id;printf(" 請輸入一個學號,在此之前插入學生信息 :");scanf("%d",&id);stud=creat_by_input();ptr=stud;if(head=NULL)head=ptr;head->next=NULL;else if(head->num=id)ptr-&g

29、t;next=head;head=ptr;elsewhile(ptr2!=NULL)ptr1=ptr2;ptr2=ptr1->next;if(ptr2->num=id)ptr1->next=ptr;ptr->next=ptr2;break;print_table_head();print_table_row(ptr);print_table_bottom();printf(" 是否繼續插入學生信息 ?(Y 繼續 N 返回主菜單)n");getchar();continue_input=getchar();if(continue_input='

30、y'|continue_input='Y')return insert_record(head);elsesystem("cls");Print_menu_main();return head;struct student *Delete_record_by_id( struct student *head)/ 按學號刪除 struct student *p=head,*ppre=NULL;int id;char continue_input;printf(" 請輸入要刪除的學號:");scanf("%d",&

31、amp;id);while(p!=NULL) if(p->num=id)break;p=p->next;if(p=NULL)printf(" 抱歉,沒有該學號的學生信息! n");elseprintf(" 確定要刪除學號為 %d 的學生的信息嗎?( Y 確定; N 返回主菜單) n",p->num);getchar();continue_input=getchar();if(continue_input='y'|continue_input='Y') ppre=head;if(ppre=p) head=p

32、->next;printf("n");free(p); elsewhile(ppre!=NULL)if(ppre->next=p)ppre->next=p->next;free(p);break; ppre=ppre->next;printf(" 刪除成功! ");/ Print_menu_main();printf(" 繼續刪除學生信息嗎? (Y 繼續; N 返回主菜單)");getchar();continue_input=getchar();if(continue_input='y'

33、|continue_input='Y')Delete_record_by_id(head);elsesystem("cls");Print_menu_main();return head;return 0;struct student *Delete_record_by_name( struct student *head)/ 按姓名刪除struct student *p=head,*ppre=NULL;char name10;char continue_input;printf(" 請輸入要刪除的姓名 :");scanf("%

34、s",name);while(p!=NULL)if(strcmp(p->name,name)=0) break;p=p->next;if(p=NULL)printf(" 抱歉,沒有該姓名的學生信息! n");goto end;elseprintf(" 確定要刪除姓名為 %s 的學生的信息嗎?( Y 確定; N 返回主菜單) ",p->name);printf("n");getchar(); continue_input=getchar();if(continue_input='y'|cont

35、inue_input='Y')ppre=head;if(ppre=p)head=p->next;free(p);elsewhile(ppre!=NULL)if(ppre->next=p)ppre->next=p->next;free(p);break;ppre=ppre->next;printf(" 刪除成功! ");/else Print_menu_main();end:printf(" 繼續刪除學生信息嗎? (Y 繼續; N 返回主菜單)");printf("n");getchar()

36、;continue_input=getchar();if(continue_input='Y'|continue_input='y') Delete_record_by_name(head);elsesystem("cls");Print_menu_main();return head;return 0;struct student * Sorting_record_by_id(struct student *head)/ 按學號排序int i=0,j,k,r;struct student *pt1,*pt2,*pt,m;if(head=NU

37、LL)printf(" 現在無同學記錄n");printf("( 按 Enter 鍵返回主菜單)n");getchar();r=getchar();if(r!='1')system("cls");Print_menu_main();elsesystem("cls");Print_menu_main();elsept1=head;pt2=head->next;for(pt=head;pt;pt=pt->next)i+;for(j=1;j<i;j+)pt1=head;pt2=head-

38、>next;for(k=1;k<i-j+1;k+)if(pt1->num>pt2->num)m=*pt1;*pt1=*pt2;*pt2=m;pt2->next=pt1->next;pt1->next=pt2;pt1=pt2;pt2=pt1->next;print_table_head();for(pt=head;pt;pt=pt->next) printf("|%10d|%10s|%10s|%10d|%10d|n",pt->num,pt->name,pt->birthday,pt->Cyuy

39、an,pt->s hujujiegou); printf("+n");return head; int main()struct student *head=NULL;struct student *p;int choice;int select;char m;char r;system("color e");printf("n");printf("n");歡迎使用學生成績管理系統!printf("n");printf("n");printf("AAAAAAA

40、AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAn");printf("n");printf("n");printf("請按照提示信息完成操作n");Print_menu_main();printf("n");printf("二二二:二二:二:二二二;二;二;二;二;二;:二:二:二n");printf("n");printf("*n");while(

41、choice!=0)printf("請選擇所要執彳T的操作:n");start:if(scanf("%d",&choice)if(choice>7|choice<0) printf(" 請輸入 0 到 7 的數字 ,選擇所要執行的操作: n"); goto start;elsegoto next;if(scanf("%c",&m)printf(" 請輸入 0 到 7 的數字,選擇所要執行的操作:n");goto start;next:switch(choice)cas

42、e 1:system("cls");head=Creat_stu_record();break;case 2:system("cls");Print_Stu_Doc(head);break;case 3:system("cls");printf(" 請選擇查找方式: 1 按姓名查找; 2 按學號查找; 3 返回主菜單");printf("n");scanf("%d",&select);switch(select)case 1:search_by_name(head);

43、break;case 2:search_by_id(head);break;case 3:system("cls");Print_menu_main();break;break;case 4:system("cls");printf(" 請輸入修改方式: 1 按學號修改; 2 按姓名修改; 3返回主菜單");printf("n");scanf("%d",&select);switch(select)case 1:system("cls");modify_record_by_id(head);break;case 2:system("cls");modify_record_by_name(head);break;case 3:system("cls");Print_menu_main();break;break;case 5:system("cls");head=insert_record(head

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論