简单的学生学分管理系统


基于C语言的控制台界面的简单的学生学分管理系统
资源截图
代码片段和文件信息
// Implement.cpp 文件
//

#include “Declare.h“
#include  
#include 
#include 
#include 
#include 
#include 
#include 
/*
** 显示主菜单
** 1. create list
** 2. display all record
** 3. insert a record
** 4. delete a record
** 5. query
** 6.  add records from a text file
** 7.  write to a text file
** 0.   quit
** give your choice(0~7):
*/
void ShowMainMenu()
{
printf(“


“);
printf(“ ****************  Menu  ******************
“);
printf(“ *  *
“);
printf(“ * 1.  create list  *
“);
printf(“ * 2.  display all record  *
“);
printf(“ * 3.  insert a record  *
“);
printf(“ * 4.  delete a record  *
“);
printf(“ * 5.  query  *
“);
printf(“ * 6.  add records from a text file *
“);
printf(“ * 7.  write to a text file  *
“);
printf(“ * 8.  reverse List  *
“);
printf(“ * 9.  delete the same record  *
“);
printf(“ * 0.  quit  *
“);
printf(“ *  *
“);
printf(“ ******************************************
“);
printf(“ give your choice (0~9):“);
}

/*
** 主控制流程:控制整个程序的运行
*/
void MainControl(StuNode *pHead)
{
// 刷屏
system(“cls“);
ShowMainMenu();
char userChoose;
do 
{
userChoose = getchar();
getchar();
if(userChoose >= ‘0‘ && userChoose <= ‘9‘)
{
break;
}else{
printf(“
Put errorplease put number between 0 and 9:“);
}

}while(true);
switch(userChoose)
{
case ‘1‘:
{
// 创建新表,如果表已经存在,则不创建
if(pHead != NULL)
{
system(“cls“);
printf(“


List already existscan not create a new list!
“);
printf(“
press any key to go back main menu...“);
_getch();
MainControl(pHead);
}
else
{
system(“cls“);
pHead = ::Create();
if(pHead == NULL)
{
printf(“List create failed.“);
return ;
}
printf(“



Create succeed!
“);
printf(“ press any key to go back main menu...“);
_getch();
MainControl(pHead);
}
}
break;
case ‘2‘:
{
system(“cls“);
// 显示所有记录
if(pHead == NULL)
{
printf(“



You have not create listyou must create one first!
“);
printf(“ press any key to go back main menu...“);
_getch();

}
else
{
::Display(pHead);
}
::MainControl(pHead);
}
break;
case ‘3‘:
{
system(“cls“);
// 插入一条记录
if(pHead == NULL)
{
printf(“



You have not create listyou must create one first!
“);
printf(“ press any key to go back main menu...“);
_getch();
}
else
{
char name[256];
float score = 0.0f;
char mark;
do
{
printf(“Please input name and score(use blank split them):
“);
scanf(“%s %f“name&score);
// printf(“%s%f
“namescore);
Insert_A_Record(pHeadnamescore);
printf(“continue(‘Y‘ or ‘y‘

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        577  2010-05-26 10:36  Student_Score_Manage_SystemStudent_Score_Manage_System.dsw

     文件     148480  2010-05-26 12:52  Student_Score_Manage_SystemDebugvc60.idb

     文件      77824  2010-05-26 12:52  Student_Score_Manage_SystemDebugvc60.pdb

     文件     582656  2010-05-26 12:52  Student_Score_Manage_SystemDebugStudent_Score_Manage_System.pdb

     文件     229461  2010-05-26 12:52  Student_Score_Manage_SystemDebugStudent_Score_Manage_System.exe

     文件          0  2010-05-26 12:52  Student_Score_Manage_SystemDebugImplement.sbr

     文件          0  2010-05-26 12:34  Student_Score_Manage_SystemDebugmain.sbr

     文件     316336  2010-05-26 12:52  Student_Score_Manage_SystemDebugStudent_Score_Manage_System.ilk

     文件       1973  2010-05-26 12:34  Student_Score_Manage_SystemDebugmain.obj

     文件    2900992  2010-05-26 12:52  Student_Score_Manage_SystemDebugStudent_Score_Manage_System.bsc

     文件    4492372  2010-05-26 12:41  Student_Score_Manage_SystemDebugStudent_Score_Manage_System.pch

     文件      40959  2010-05-26 12:52  Student_Score_Manage_SystemDebugImplement.obj

     文件        416  2010-05-26 12:51  Student_Score_Manage_Systemindata.txt

     文件       1119  2010-05-26 12:52  Student_Score_Manage_SystemStudent_Score_Manage_System.plg

     文件      33792  2010-05-26 12:55  Student_Score_Manage_SystemStudent_Score_Manage_System.ncb

     文件       1376  2010-05-26 11:44  Student_Score_Manage_Systemoutdata.txt

     文件       1015  2010-05-26 12:22  Student_Score_Manage_SystemDeclare.h

     文件      12947  2010-05-26 12:52  Student_Score_Manage_SystemImplement.cpp

     文件        391  2010-05-26 12:55  Student_Score_Manage_Systemmain.cpp

     文件      49664  2010-05-26 12:55  Student_Score_Manage_SystemStudent_Score_Manage_System.opt

     文件       4639  2010-05-26 12:55  Student_Score_Manage_SystemStudent_Score_Manage_System.dsp

     目录          0  2010-05-26 10:36  Student_Score_Manage_SystemDebug

     目录          0  2010-05-26 10:36  Student_Score_Manage_System

----------- ---------  ---------- -----  ----

              8896989                    23


版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)