此系统是基于Linux系统环境,通过ubantu18.04平台,面向教师与学生为用户的学生管理系统。
所触及到的知识点:C语言(包括C语言基础,结构体和预处理与程序模块化),Linux基础,文件IO,数据结构等。
产品功能介绍如下:
学生端:
- 登录学生端
- 查询学生信息
- 修改学生信息
- 显示学生信息
- 修改用户密码
- 退出
教师端:
- 登录教师端
- 增加学生信息
- 删除学生信息
- 学生信息排序
- 查询学生信息
- 修改学生信息
- 显示学生信息
- 修改用户密码
- 退出
教务端(管理员端):
- 登录教务端
- 增加教师和班级信息
- 显示教师和班级信息
- 删除教师和班级信息
- 以班级或者专业的形式存储学生信息
- 所有班级以目录的形式存储打开,成绩显示按学号/总分排序
- 一键生成师生用户
- 退出
- 密码管理使用高级加密
以下是详细代码及步骤:
1.建立结构体并将其封装:
#ifndef __JGT_H
#define __JGT_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SIZE 20
//建立学生信息结构体
typedef struct stu
{
//学生信息
char name[SIZE];
char stu_class[SIZE];
char num[SIZE];
int Chinese;
int math;
int English;
}stu;
//建立教师信息结构体
typedef struct teach
{
//教师信息
char name[SIZE];
char sex[SIZE];
char t_class[SIZE];
char num[SIZE];
int old;
}teach;
//建立申请账号结构体
typedef struct
{
char account[SIZE];
char password[SIZE];
}user;
//双向链表结构体
typedef struct node
{
stu stu1;
struct node *prev;
struct node *next;
}node;
#endif
2.将项目中多次运用的函数代码进行封装
需要用到的代码如下:
#include "jgt.h"
#include "doublu_uesd.h"
//学生信息链表
node *initList1(void)
{
node *new = (node *)malloc(sizeof(node));
if (new == NULL)
{
printf("malloc fail\n");
}
*new->stu1.name = 0;
*new->stu1.stu_class = 0;
*new->stu1.num = 0;
new->stu1.Chinese = 0;
new->stu1.math = 0;
new->stu1.English = 0;
new->next = new;
new->prev = new;
return new;
}
void display()
{
FILE *fp = fopen("student.txt","r");
stu stu1;
if (!fp)
{
printf("文件打开失败!");
return ;
}
while (fread(&stu1,sizeof(stu),1,fp))
{
printf("\e[0;31m姓名:%s,班级:%s,学号:%s,语文:%d,数学:%d,英语:%d\e[0m\n"
,stu1.name,stu1.stu_class,stu1.num,stu1.Chinese,stu1.math,stu1.English);
}
fclose(fp);
}
//将文件中的数据输入链表
struct node *readd(node *sec_head)
{
FILE *fp = fopen("student.txt","a+");
stu stu1;
if (!fp)
{
printf("文件打开失败!");
}
while (fread(&stu1,1,sizeof(stu),fp))
{
node *new = (node *)malloc(sizeof(node));
new = initList1();
memcpy(new,&stu1,sizeof(stu));
//引用尾插函数
insert(sec_head,new);
}
fclose(fp);
return 0;
}
//链表写入文件
struct node *line_into_fine(node *sec_head)
{
FILE *fp = fopen("student.txt","w+");
if (!fp)
{
printf("文件打开失败!");
return ;
}
struct stu stu1 = {0};
node *p = NULL;
for ( p = sec_head->next; p !=sec_head;p = p->next)
{
fwrite(&p->stu1,sizeof(stu),1,fp);
fread(&p->stu1,sizeof(stu),1,fp);
free(p);
}
close(fp);
return ;
}
//更改密码
void change_password()
{
user us1;
char password[SIZE];
char account[SIZE];
printf("请输入学号");
scanf("%s",account);
printf("请输入您要修改的密码\n");
scanf("%s",password);
FILE *fp = fopen("user.txt","r+");
if (fp == -1)
{
printf("文件打开失败!\n");
}
int fg = open("linshi.txt",O_RDWR|O_CREAT,0777);
if (fg == -1)
{
printf("文件打开失败!\n");
}
add_user(fg,account,password);
fclose(fp);
close(fg);
remove("user.txt");
rename("linshi.txt","user.txt");
apply_user();
printf("更改密码成功!\n");
return 0;
}
int find_data(char *num)
{
FILE *fp = fopen("student.txt","r");
stu stu1;
if (!fp)
{
printf("文件打开失败!");
return ;
}
while (fread(&stu1,sizeof(stu),1,fp))
{
if (strcmp(stu1.num,num)==0)
{
printf("\e[0;31m""\e[4m""姓名:%s,班级:%s,学号:%s,语文:%d,数学:%d,英语:%d\e[0m\n"
,stu1.name,stu1.stu_class,stu1.num,stu1.Chinese,stu1.math,stu1.English);
return 1;
}
}
fclose(fp);
return 0;
}
//账号登陆函数(学生端与教师端)
int entry_page_st(void)
{
int u=1,x=0;
char sh;
while (getchar()!='\n');
while (u)
{
printf("\e[0;36m""========================登陆页面========================\n");
printf("\t\t请按'1'键登陆账号\n");
printf("=======================================================\e[0m\n");
sh = getchar();
switch (sh)
{
case '1':
printf("\n\n\e[0;31mPS:账号为学号或工号\n");
printf("PS:原始密码:123456\e[0m\n\n");
x = log_on();
if (x == 2)
{
return 1;
}
break;
}
while (getchar()!='\n');
}
return 0;
}
//头插
void insert_h(node *head, node *new)
{
new->next = head->next;
head->next->prev = new;
new->prev = head;
head->next = new;
}
//尾插
void insert(node *head, node *new)
{
new->prev = head->prev;
new->next = head;
head->prev->next = new;
head->prev = new;
}
//排序功能函数
void px(node *sec_head)
{
int len=0,i,j,score,score1;
node *p =NULL;
node *tmp = NULL;
stu stu1;
for (p = sec_head->next; p!= sec_head; p=p->next)
{
len++;
}
if (len == 0)
{ return ; }
for (i=0; i<=len; i++)
{
p = sec_head->next;
score =((p->stu1.Chinese)+(p->stu1.math)+(p->stu1.English));
for ( j=i; j<=len; j++)
{
tmp = p->next;
score1 = ((tmp->stu1.Chinese)+(tmp->stu1.math)+(tmp->stu1.English));
if (score1 > score)
{
p->next->prev = p->prev;
p->prev->next = p->next;
insert_h(tmp,p);
}
else
p = p->next;
}
}
}
3.学生类函数:
#include "student.h"
#include "jgt.h"
#include "doublu_uesd.h"
//学生端页面
int student(void)
{
node *sec_head;
char ch,num[SIZE]={0};
int x=1,t=0;
struct stu stu1 = {0};
//登陆页面
entry_page_st();
while (getchar() != '\n');
while (x)
{
printf("\e[0;36m""=======================学生端页面=======================\n");
printf("\t\t查询学生信息请按'p':\n");
printf("\t\t修改学生信息请按'f':\n");
printf("\t\t显示学生信息请按'd':\n");
printf("\t\t修改账户密码请按'u':\n");
printf("\t\t退出请按'q':\n");
printf("=======================================================\n""\e[0m");
ch = getchar();
switch (ch)
{
case 'p':
printf("请输入您要查找的学生所属学号:\n");
scanf("%s",num);
t = find_data(num);
if (t == 0)
{
printf("您要查找的学生所属学号不存在!\n");
}
break;
case 'f':
sec_head = initList1();
readd(sec_head);
change_stu(sec_head);
line_into_fine(sec_head);
break;
case 'd':
display();
break;
case 'u':
change_password();
break;
case 'q':
printf("请按任意键确认退出:\n");
x = 0;
break;
default:
break;
}
while (getchar()!='\n');
}
return 0;
}
//学生端修改信息
node *change_stu(node *sec_head)
{
char num[SIZE];
char name[SIZE];
printf("请输入您要修改的学生信息所属学号:\n");
scanf("%s",num);
node *p ;
p = find(sec_head,num);
if (p == NULL)
{
printf("您要查找的学生所属学号不存在!\n");
return;
}
int n;
printf("请输入您要修改的信息:\n");
printf("姓名请按'1':\n");
scanf("%d",&n);
if (n == 1)
{
printf("请输入要修改的姓名:\n");
scanf("%s",name);
strcpy(&p->stu1.name,name);
}
printf("信息修改完成!\n");
return ;
}
4.教师类函数:
#include "teacher.h"
#include "jgt.h"
#include "doublu_uesd.h"
//教师端页面
int teacher(void)
{
node *sec_head;
char ch,num[SIZE]={0};
int x=1,t=0;
struct stu stu1 = {0};
//登陆页面
entry_page_st();
while (getchar() != '\n');
while (x)
{
printf("\e[0;36m""=======================教师端页面=======================\n");
printf("\t\t增加学生信息请按'a':\n");
printf("\t\t显示学生信息请按'p':\n");
printf("\t\t排序学生信息请按'b':\n");
printf("\t\t寻找学生信息请按'f':\n");
printf("\t\t删除学生信息请按'd':\n");
printf("\t\t修改学生信息请按'c':\n");
printf("\t\t修改用户密码请按'u':\n");
printf("\t\t退出请按'q':\n");
printf("=======================================================\e[0m\n");
ch = getchar();
switch (ch)
{
case 'a':
add_man();
printf("添加学生信息成功!\n");
break;
case 'p':
display();
break;
case 't':
display_lise(sec_head);
break;
case 'b':
sec_head = initList1();
readd(sec_head);
px(sec_head);
display_lise(sec_head);
line_into_fine(sec_head);
break;
case 'f':
printf("请输入您要查找的学生所属学号:\n");
scanf("%s",num);
t = find_data(num);
if (t == 0)
{
printf("您要查找的学生所属学号不存在!\n");
}
break;
case 'd':
sec_head = initList1();
readd(sec_head);
del(sec_head);
line_into_fine(sec_head);
break;
case 'c':
sec_head = initList1();
readd(sec_head);
change(sec_head);
line_into_fine(sec_head);
break;
case 'u':
change_password();
break;
case 'q':
printf("请按任意键确认退出:\n");
x = 0;
break;
}
while (getchar()!='\n');
}
return 0;
}
int add_man(void)
{
FILE *fp = fopen("student.txt","a+");
if (!fp)
{
printf("文件打开失败!");
return ;
}
struct stu stu1 = {0};
printf("请输入学生姓名:");
scanf("%s",stu1.name);
while (getchar() != '\n');
printf("请输入学生班级:");
scanf("%s",stu1.stu_class);
while (getchar() != '\n');
printf("请输入学生学号:");
scanf("%s",stu1.num);
while (getchar() != '\n');
printf("请输入学生语文成绩:");
scanf("%d",&stu1.Chinese);
while (getchar() != '\n');
printf("请输入学生数学成绩:");
scanf("%d",&stu1.math);
while (getchar() != '\n');
printf("请输入学生英语成绩:");
scanf("%d",&stu1.English);
fwrite(&stu1,sizeof(stu),1,fp);
fclose(fp);
return 0;
}
//删除信息函数
node *del(node *sec_head)
{
char num[SIZE];
printf("请输入您要删除的学生信息所属学号:\n");
scanf("%s",num);
node *p ;
p = find(sec_head,num);
if (p == NULL)
{
printf("您要查找的学生所属学号不存在!\n");
}
p->next->prev = p->prev;
p->prev->next = p->next;
printf("信息删除完成!\n");
return ;
}
//更改学生信息
node *change(node *sec_head)
{
char num[SIZE];
char name[SIZE];
printf("请输入您要修改的学生信息所属学号:\n");
scanf("%s",num);
node *p ;
p = find(sec_head,num);
if (p == NULL)
{
printf("您要查找的学生所属学号不存在!\n");
return;
}
int n;
printf("请输入您要修改的信息:\n");
printf("姓名请按'1',语文请按'2',数学请按'3',英语请按'4':\n");
scanf("%d",&n);
if (n == 1)
{
printf("请输入要修改的姓名:\n");
scanf("%s",name);
strcpy(&p->stu1.name,name);
}
if (n == 2)
{
printf("请输入要修改的分数:\n");
scanf("%d",&p->stu1.Chinese);
}
if (n == 3)
{
printf("请输入要修改的分数:\n");
scanf("%d",&p->stu1.math);
}
if (n == 4)
{
printf("请输入要修改的分数:\n");
scanf("%d",&p->stu1.English);
}
printf("信息修改完成!\n");
return ;
}
//链表遍历寻找函数
node *find(node *sec_head,char *data)
{
node *p ;
for (p = sec_head->next; p!= sec_head; p=p->next)
{
if(strcmp(p->stu1.num,data)==0)
{
return p;
}
}
return NULL;
}
//遍历链表
void display_lise(node *sec_head)
{
node *p = sec_head->next;
for ( p = sec_head->next; p !=sec_head;p = p->next)
{
printf("\e[0;31m""姓名:%s,班级:%s,学号:%s,语文:%d,数学:%d,英语:%d\e[0m\n"
,p->stu1.name,p->stu1.stu_class,p->stu1.num
,p->stu1.Chinese,p->stu1.math,p->stu1.English);
}
}
5.教务段类函数:
#include "school.h"
#include "jgt.h"
#include "doublu_uesd.h"
//教务端页面
int school(void)
{
node *sec_head;
char ch,num[SIZE]={0};
int x=1,t=0;
char dir;
//登陆页面
entry_page();
while (getchar()!='\n');
while (x)
{
printf("\e[0;36m""=======================教务端页面=======================\n");
printf("\t\t添加教师和班级信息请按'a':\n");
printf("\t\t显示教师和班级信息请按'p':\n");
printf("\t\t删除教师和班级信息请按'd':\n");
printf("\t\t以班级的形式存储学生信息请按's':\n");
printf("\t\t以目录的形式查看学生信息请按'k':\n");
printf("\t\t一键生成师生用户请按'j':\n");
printf("\t\t退出请按'q':\n");
printf("=======================================================\n""\e[0m");
ch = getchar();
switch (ch)
{
case 'a':
add_teacher();
printf("添加信息成功!\n");
break;
case 'p':
teach_display();
break;
case 'd':
del_teacher();
break;
case 's':
sec_head = initList1();
readd(sec_head);
px(sec_head);
save_class(sec_head);
printf("学生信息以班级形式存储完成!\n");
break;
case 'k':
class_message();
break;
case 'q':
printf("请按任意键确认退出:\n");
x = 0;
break;
case 'j':
apply_user();
printf("添加账户成功!\n");
break;
default:
break;
}
while (getchar()!='\n');
}
return 0;
}
//添加教师信息
int add_teacher(void)
{
FILE *fp = fopen("teacher.txt","a+");
if (!fp)
{
printf("文件打开失败!");
return 0;
}
struct teach t1 ={0};
printf("请输入姓名:\n");
scanf("%s",t1.name);
while (getchar() != '\n');
printf("请输入性别:");
scanf("%s",t1.sex);
while (getchar() != '\n');
printf("请输入教师授课班级:");
scanf("%s",t1.t_class);
while (getchar() != '\n');
printf("请输入教师工号:");
scanf("%s",t1.num);
while (getchar() != '\n');
printf("请输入教师年龄:");
scanf("%d",&t1.old);
fwrite(&t1,sizeof(teach),1,fp);
fclose(fp);
return 0;
}
//查看教师信息
void teach_display()
{
FILE *fp = fopen("teacher.txt","r");
if (!fp)
{
printf("文件打开失败!");
return ;
}
teach t1;
while (fread(&t1,sizeof(teach),1,fp))
{
printf("\e[0;31m""教师姓名:%s,性别:%s,教师授课班级:%s,教师工号:%s,教师年龄:%d\n""\e[0m"
,t1.name,t1.sex,t1.t_class,t1.num,t1.old);
}
fclose(fp);
}
//删除教师信息
void del_teacher(void)
{
teach t1;
FILE *fp = fopen("teacher.txt","r+");
FILE *fg = fopen("linshi.txt","w+");
char num[SIZE];
printf("请输入您要删除的教师工号:\n");
scanf("%s",num);
while (fread(&t1,sizeof(teach),1,fp))
{
if (strcmp(&t1.num,num)!=0)
{
fwrite(&t1,sizeof(teach),1,fg);
}
}
fclose(fp);
fclose(fg);
remove("teacher.txt");
rename("linshi.txt","teacher.txt");
printf("删除成功!\n");
}
//存储班级信息
node *save_class(node *sec_head)
{
node *p ;
stu stu1;
struct dirent *tmp;
FILE *fp = fopen("学院班级/通信工程.txt","w+");
FILE *fg = fopen("学院班级/金融学.txt","w+");
close(fp);
close(fg);
for (p = sec_head->next; p!= sec_head; p=p->next)
{
if(strcmp(p->stu1.stu_class,"通信工程")==0)
{
DIR *dir = opendir("学院班级");
if (dir == NULL)
{
mkdir("学院班级",0777);
}
opendir("学院班级");
FILE *fp = fopen("学院班级/通信工程.txt","a+");
if (!fp)
{ printf("文件打开失败!");
return ;
}
fwrite(&p->stu1,sizeof(stu),1,fp);
fread(&p->stu1,sizeof(stu),1,fp);
}
}
for (p = sec_head->next; p!= sec_head; p=p->next)
{
if(strcmp(p->stu1.stu_class,"金融学")==0)
{
DIR *dir = opendir("学院班级");
if (dir == NULL)
{
mkdir("学院班级",0777);
}
opendir("学院班级");
FILE *fg = fopen("学院班级/金融学.txt","a+");
if (!fg)
{ printf("文件打开失败!");
return ;
}
fwrite(&p->stu1,sizeof(stu),1,fg);
fread(&p->stu1,sizeof(stu),1,fg);
}
}
return ;
}
//查看班级信息
void class_message()
{
char class[SIZE];
printf("请输入你想查看班级的信息:\n");
scanf("%s",class);
stu stu1;
FILE *fp = fopen("学院班级/通信工程.txt","r");
if (!fp)
{ printf("文件打开失败!\n");
return ;
}
while (fread(&stu1,sizeof(stu),1,fp))
{
if (strcmp(class,"通信工程")==0)
{
printf("\e[0;31m""姓名:%s,班级:%s,学号:%s,语文:%d,数学:%d,英语:%d\n""\e[0m"
,stu1.name,stu1.stu_class,stu1.num,stu1.Chinese,stu1.math,stu1.English);
}
}
FILE *fg = fopen("学院班级/金融学.txt","r");
if (!fg)
{ printf("文件打开失败!\n");
return ;
}
while (fread(&stu1,sizeof(stu),1,fg))
{
if (strcmp(class,"金融学")==0)
{
printf("\e[0;31m""姓名:%s,班级:%s,学号:%s,语文:%d,数学:%d,英语:%d\n""\e[0m"
,stu1.name,stu1.stu_class,stu1.num,stu1.Chinese,stu1.math,stu1.English);
}
}
close(fp);
close(fg);
}
//账号登陆函数
int entry_page(void)
{
int u=1,x=0;
char sh;
while (getchar()!='\n');
while (u)
{
printf("\e[0;36m""========================登陆页面========================\n");
printf("\t\t登陆账号请按'1'\n");
printf("\t\t注册账号请按'2'\n");
printf("=======================================================\n""\e[0m");
sh = getchar();
switch (sh)
{
case '1':
x = log_on();
if (x == 2)
{
return 1;
}
break;
case '2':
apply_account();
break;
}
while (getchar()!='\n');
}
return 0;
}
//一键生成师生账户密码
int apply_user(void)
{
char account[SIZE] = {0};
char password[SIZE] = {0};
int comp;
int fp;
stu stu1;
user user1;
teach t1;
fp = open("user.txt",O_RDWR|O_CREAT,0777);
if (fp == -1)
{
printf("文件打开失败!\n");
}
FILE *fg = fopen("student.txt","r");
if (fg == -1)
{
printf("学生文件打开失败!\n");
}
FILE *ft = fopen("teacher.txt","r");
if (fg == -1)
{
printf("学生文件打开失败!\n");
}
while (fread(&stu1,1,sizeof(stu),fg))
{
comp = account_file(fp,stu1.num);
if (comp != 1)
{
strcpy(account,stu1.num);
strcpy(password,"123456");
//将账号和密码添加到文件末尾
add_user(fp,account,password);
//fwrite(&user1,sizeof(user),1,fp);
}
}
while (fread(&t1,1,sizeof(teach),ft))
{
comp = account_file(fp,t1.num);
if (comp != 1)
{
strcpy(account,t1.num);
strcpy(password,"123456");
//将账号和密码添加到文件末尾
add_user(fp,account,password);
}
}
close(fp);
fclose(fg);
fclose(ft);
return 0;
}
6.实现账户功能类函数:
#include "account.h"
#include "jgt.h"
//账户登陆页面函数
int log_on(void)
{
char account[SIZE] = {0};
char password[SIZE] = {0};
char read_buffer[SIZE] = {0};
int fd,fg,comp,comp1;
int n;
//打开文件
fd = open("user.txt",O_RDWR|O_CREAT,0777);
if (fd == -1)
{
printf("文件打开失败!\n");
}
fg = open("user1.txt",O_RDWR|O_CREAT,0777);
if (fg == -1)
{
printf("文件打开失败!\n");
}
printf("===登录页面===\n");
printf("请输入账号:");
scanf("%s",account);
//输入密码
printf("请输入密码:");
scanf("%s", password);
lock(password);
//检测账号是否存在
comp = account_file(fd,account);
comp1 = account_file(fg,account);
if (comp == 0 && comp1==0)
{
printf("账号不存在!\n");
}
read(fd,read_buffer,SIZE);
read(fg,read_buffer,SIZE);
if (comp_acc(read_buffer,password))
{
printf("\e[0;31m""\n登陆成功!\n\n""\e[0m");
close(fd);
close(fg);
return 2;
}
else
{
printf("账号或密码输入错误!\n");
close(fd);
close(fg);
return 1;
}
return 0;
}
//申请账户函数
int apply_account(void)
{
char account[SIZE] = {0};
char password[SIZE] = {0};
int comp;
int fd = 0;
//打开文件
fd = open("user1.txt",O_RDWR|O_CREAT,0777);
if (fd == -1)
{
printf("文件打开失败!\n");
}
printf("请输入您要注册的账号:\n");
scanf("%s",account);
//检查账号是否存在
comp = account_file(fd,account);
if (comp == 1 )
{
printf("账号已存在!\n");
return -1;
}
else
//输入密码
printf("请输入密码:");
scanf("%s",password);
//将账号和密码添加到文件末尾
add_user(fd,account,password);
printf("账户注册成功!\n");
close(fd);
return 0;
}
//布尔类型,判断目标文件中的账号是否存在
bool account_file(int fd,char *account)
{
//加密
//lock(account);
char read_buffer[SIZE] = {0};
//将光标移到最开始的位置
lseek(fd,0,SEEK_SET);
int read_num = 1;
while (read_num > 0)
{
//读取20个字节
read_num = read(fd,read_buffer,SIZE);
//比对
if (comp_acc(read_buffer,account))
{
//还原
//lock(account);
return true;
}
//往后移动20个字节
lseek(fd,20,SEEK_CUR);
}
//还原
//lock(account);
return false;
}
//判断两段字符是否相等
bool comp_acc(char *acc1,char *acc2)
{
int len1 = strlen(acc1);
int len2 = strlen(acc2);
if (len1 != len2)
{
return false;
}
//比较两个字符串
for (int i = 0; i < len1; i++)
{
if (acc1[i]!=acc2[i])
{
return false;
}
}
return true;
}
//添加用户
bool add_user(int fp,char *account,char *password)
{
//加密
//lock(account);
lock(password);
//读到文件末尾
lseek(fp,0,SEEK_END);
int write_num = 0;
//写入账号
write_num = write(fp,account,SIZE);
if (write_num <= 0)
{
return false;
}
//写入密码
write_num = write(fp,password,SIZE);
if (write_num <= 0)
{
return false;
}
return true;
}
//加密函数
void lock(char *str)
{
int len = strlen(str);
//保存起始密钥
char ch_key = KEY;
//开始加密
int i;
for ( i = 0; i < len; i++)
{
//异或
if ((str[i] ^ ch_key)!=0)
{
//防止异或后提早出现结束符
str[i] ^=ch_key;
}
ch_key;
}
}
以上代码都需要进行函数封装,即预处理与程序模块化。
7.主函数:
#include "account.h"
#include "school.h"
#include "teacher.h"
#include "student.h"
#include "jgt.h"
#include "doublu_uesd.h"
int main(void)
{
int x = 1;
int num;
char ch;
while (x)
{
printf("\e[0;36m""====================欢迎使用信息系统====================\n");
printf("\t\t学生端请按's':\n");
printf("\t\t教师端请按't':\n");
printf("\t\t教务端请按'w':\n");
printf("\t\t退出请按'e':\n");
printf("=======================================================\n""\e[0m");
ch = getchar();
switch (ch)
{
case 's':
student();
break;
case 't':
teacher();
break;
case 'w':
school();
break;
case 'e':
x = 0;
break;
default:
break;
}
while (getchar()!='\n');
}
return 0;
}
此系统特点如下:
实用性:在满足业务功能的前提下,能够适应业务角色的工作的特点,并做到简单、实用、人性化(站在使用者的角度考虑)。
可维护性:此系统代码按照标准化、规范化、做到分层设计。
良好的适应性:考虑到系统建设是一个循序渐进、不断扩充的过程,立足当前,着眼长远,因此小编将系统采用积木式结构,整体构架考虑与现有系统进行无缝衔接,为今后系统扩展和集成留有扩充余量。文章来源:https://www.toymoban.com/news/detail-487292.html
如果此贴有帮助到您,请点个赞,谢谢!文章来源地址https://www.toymoban.com/news/detail-487292.html
到了这里,关于C语言 | 基于Linux下的学生管理系统的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!