| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 4452 人关注过本帖
标题:学生成绩管理系统求助! 学生成绩管理系统求助!
只看楼主 加入收藏
appleqweewq1
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2016-12-9
收藏
 问题点数:0 回复次数:12 
学生成绩管理系统求助! 学生成绩管理系统求助!
学生成绩管理系统求助!
学生成绩管理系统求助!
实验十三(2学时) 综合设计-I:文件和学生成绩系统框架设计
1)    已知:ASCII文件stuInfo.txt中存放有100名学生信息,包括学号、姓名、学院代码、性别代码、10门成绩;ASCII文件sexCode.txt中存放性别代码对应的性别;ASCII文件collegeCode.txt中存放学院代码所对应的学院信息
2)    设计三个结构体,可以分别包含上述三个文件中包含的内容
3)    设计《学生成绩系统》的框架(要求至少4个函数,至少3个源文件):
******学生成绩系统菜单*******
1. 原始文件读取
2. 按姓名排序,输出
3. 按平均成绩排序,输出
4. 输出给定学院学生
5. 修改给定学生成绩信息(修改后的信息,需输出到文件)
6. 按姓名查询学生,输出
7. 修改系统密码*
0. 返回上一级菜单
*****************************
4)    利用函数完成菜单中的第1个模块:读取文件内容到结构体数组或指针

实验十四(2学时) 综合设计-II:学生成绩系统
1)    利用函数完成学生成绩系统菜单中的2
2)    利用函数完成学生成绩系统菜单中的3

实验十五(2学时) 综合设计-III:学生成绩系统
1)    利用函数完成学生成绩系统菜单中的4
2)    利用函数完成学生成绩系统菜单中的5
3)    利用函数完成学生成绩系统菜单中的6

实验十六(2学时) 综合设计-IV:学生成绩系统
1)    联调,并完成整个系统测试
2)    提高模块*:菜单中的7
函数执行需有密码(密码在文件中不得以明文出现);
密码修改模块

文本1:
1 信息学院
2 计算机学院
3 文法学院
4 外国语学院
5 数理学院
6 会金学院
7 化工学院
8 商学院
9 航空学院
10 艺术学院



文本2:
1 男
0 女



文本3:
140510 洪旅玻 0 5 25 43 64 96 89 38 16 28 48 93
140207 汪桓矶 1 2 98 68 67 62 84 60 79 86 63 86
140908 钮达浚 1 9 72 69 70 68 72 83 78 66 84 99
140501 邱嶙解 1 5 66 96 76 63 72 79 100 99 96 95
140202 叶建林 1 2 71 97 76 92 76 94 84 63 64 87
140401 巴隆九 1 4 60 89 94 70 86 61 95 75 87 64
140901 俞法复 1 9 68 97 87 64 76 73 87 97 83 92
140609 唐寒丛 0 6 90 61 70 94 75 79 93 67 82 91
140110 班慷刚 1 1 53 81 89 64 46 96 76 2 22 82
140607 鄂宽佼 1 6 63 94 97 60 70 77 73 62 96 75
140605 施俭倍 1 6 68 77 95 97 72 79 67 76 63 79
140910 水奔横 0 9 95 89 48 76 100 81 12 1 85 88
140109 水昌瀑 1 1 99 18 21 74 82 25 32 85 24 92
140703 潘弼宽 1 7 60 80 79 87 73 77 61 92 91 82
140310 邢端地 1 3 91 3 40 71 60 10 67 60 27 73
140909 周桓环 1 9 19 30 21 47 20 99 65 22 3 61
140603 柳钽钩 1 6 86 99 82 66 76 88 83 62 79 71
140206 宓强进 1 2 79 87 81 96 66 83 67 75 75 95
140105 毕镔百 1 1 94 60 92 97 96 62 64 87 89 87
140601 麻俚历 1 6 65 77 64 78 92 95 72 70 84 93
140406 黎辽利 1 4 76 74 93 71 74 61 82 99 96 81
140902 嵇灿处 1 9 91 96 85 82 69 83 79 74 82 94
140504 诸秉栊 1 5 71 80 60 94 68 87 93 72 90 90
140101 荣国宏 1 1 69 80 84 88 69 69 92 74 95 89
140103 钱复阜 1 1 66 82 76 66 65 91 95 79 65 67
140205 雷留狄 1 2 84 80 92 90 84 83 97 69 60 68
140010 吴祷举 0 0 100 98 93 95 88 77 99 72 85 99
140404 解琥俚 1 4 77 95 88 100 82 99 91 74 74 71
140005 裴桓价 1 0 63 65 79 68 74 63 78 76 87 65
140307 苏胞按 1 3 64 84 69 88 87 83 66 71 72 69
140405 阮笃璀 1 4 79 93 90 61 81 88 91 73 75 78
140805 司径晋 1 8 82 85 95 68 89 70 96 84 88 90
140608 乔恳火 1 6 80 75 91 66 74 96 75 61 94 61
140705 褚磊并 1 7 87 69 93 83 61 86 87 62 80 62
140802 董得管 1 8 88 74 92 99 94 88 68 63 70 75
140604 祁浜复 1 6 64 80 71 91 99 93 95 63 74 98
140801 俞筹浩 1 8 75 79 70 90 100 73 68 65 73 97
140903 张积京 1 9 78 65 77 82 98 64 77 64 94 94
140502 伍煅居 1 5 99 93 88 72 66 84 65 70 64 63
140106 童俭棰 1 1 92 60 65 87 82 95 70 80 66 65
140602 范斐畴 1 6 89 82 88 79 90 100 71 60 75 85
140806 齐晁笃 1 8 91 91 88 85 93 88 64 67 97 76
140905 嵇鸿连 1 9 88 98 61 66 97 65 97 88 66 92
140204 龚贵归 1 2 85 91 87 73 100 94 93 98 96 65
140807 米大淋 1 8 67 70 86 66 70 99 80 66 71 82
140104 陈慷沥 1 1 70 65 83 95 96 73 83 83 67 85
140906 贲琮看 1 9 83 61 81 74 91 68 87 97 60 68
140402 苏嘉瀚 1 4 73 77 85 82 95 94 77 89 94 76
140209 酆谅卢 0 2 24 56 1 62 17 17 11 15 13 44
140409 甄宽观 0 4 74 33 91 38 25 51 14 10 86 60
140506 班曝临 0 5 77 99 67 84 61 82 74 70 86 87
140001 杭登陵 1 0 65 62 76 75 97 82 79 64 65 68
140810 王理磷 1 8 89 45 27 60 88 34 89 34 50 0
140809 花陵阜 0 8 82 99 77 96 82 93 82 88 66 75
140610 单材洪 1 6 78 46 36 67 76 75 3 35 81 57
140706 裘顾昂 1 7 86 79 71 64 62 100 71 96 100 90
140308 焦科皓 0 3 64 77 69 83 63 71 89 93 72 100
140002 范藩尖 1 0 63 63 61 66 93 73 61 88 82 66
140007 山按率 0 0 95 74 89 75 90 82 97 94 67 61
140309 米赋皎 0 3 83 34 44 13 86 36 95 86 70 57
140904 邓进灏 1 9 61 92 63 65 76 97 90 63 86 76
140305 马绸岗 1 3 79 78 80 95 95 63 76 87 98 81
140201 郭琛矿 1 2 65 99 64 87 100 61 88 99 92 100
140503 和策近 1 5 69 90 80 78 86 65 95 94 97 93
140704 许焕广 1 7 89 86 62 76 64 100 80 79 96 73
140403 邬贵键 1 4 68 69 76 71 72 93 65 70 89 85
140009 芮瀚火 1 0 80 97 89 76 97 71 94 73 84 65
140210 蔡峦彻 0 2 27 75 80 77 76 25 82 100 16 1
140107 周律枫 0 1 43 69 58 98 72 30 49 66 87 67
140304 仇晖介 1 3 81 100 67 87 94 81 95 91 70 74
140302 郝矶里 1 3 67 83 74 85 91 82 73 98 83 91
140407 柏洹博 0 4 86 97 97 80 95 74 83 81 87 86
140507 祝奎斑 1 5 74 100 89 100 70 91 91 82 96 84
140303 马觉杠 1 3 69 94 73 82 68 63 90 97 94 97
140410 雷留君 0 4 7 63 14 82 85 89 5 53 23 72
140301 巴廖甘 1 3 74 72 82 76 78 73 65 76 68 90
140707 邹荆辟 1 7 88 80 72 78 62 66 92 97 65 74
140004 米川杰 1 0 97 76 61 73 77 62 79 86 90 100
140306 孙炮恒 0 3 91 84 95 77 72 99 72 80 79 82
140108 屈霭季 1 1 48 96 6 10 35 54 0 27 47 39
140710 计家诀 1 7 92 89 91 96 95 93 89 61 66 97
140208 戴财利 1 2 78 43 77 21 100 29 16 20 40 82
140708 赖钧瀚 1 7 95 68 96 85 79 68 76 82 79 98
140907 成技檗 1 9 71 69 63 83 100 75 97 100 89 84
140003 博朗百 1 0 83 97 75 86 91 77 77 78 73 61
140509 胥勃雕 1 5 9 37 35 5 27 93 94 73 3 60
140701 荣君锤 1 7 87 60 79 75 71 66 68 96 100 78
140505 包畅津 1 5 93 67 76 97 68 85 62 62 92 86
140203 双聆粮 1 2 92 100 82 89 87 62 68 86 83 98
140008 危耿锂 0 0 90 91 84 92 80 61 60 72 91 69
140508 孙谛波 1 5 69 78 91 98 64 72 61 79 87 68
140102 莫柏弘 1 1 66 99 65 62 78 61 64 80 70 84
140709 奚留绰 0 7 79 60 100 91 64 86 92 89 72 89
140808 卓葛贵 0 8 97 73 78 85 66 62 95 73 90 90
140803 黄保旅 1 8 80 83 70 97 75 88 64 95 66 90
140702 诸火管 1 7 72 79 63 90 93 63 69 80 94 97
140606 宁湖参 1 6 97 69 96 77 83 80 67 65 93 61
140006 袁郸鹤 1 0 69 70 94 71 65 89 78 86 84 81
140408 程枫洪 0 4 51 89 29 16 77 100 7 22 69 7
140804 嵇砥加 1 8 91 72 87 61 64 66 100 61 67 83
搜索更多相关主题的帖子: 信息 源文件 结构体 管理系统 姓名 
2016-12-10 09:35
marlow
Rank: 6Rank: 6
等 级:侠之大者
威 望:2
帖 子:125
专家分:419
注 册:2016-7-18
收藏
得分:0 
需要帮助什么呢?

一切都在学习、尝试、摸索中
2016-12-10 10:44
appleqweewq1
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2016-12-9
收藏
得分:0 
这个程序怎么编啊?我是大一新手不会啊,,求助,怎么按照姓名查找,排序,1. 原始文件读取
2. 按姓名排序,输出
3. 按平均成绩排序,输出
4. 输出给定学院学生
5. 修改给定学生成绩信息(修改后的信息,需输出到文件)
6. 按姓名查询学生,输出
7. 修改系统密码*
0. 返回上一级菜单这些功能怎么实现  跪求
2016-12-10 14:55
marlow
Rank: 6Rank: 6
等 级:侠之大者
威 望:2
帖 子:125
专家分:419
注 册:2016-7-18
收藏
得分:0 
你这八个学时的内容,在没有现成代码的情况下,要全部实现系统的各种功能,需要花不少的时间和精力,不知道是否有高手很快帮你实现,给我点时间和耐心吧,,,

一切都在学习、尝试、摸索中
2016-12-10 15:38
appleqweewq1
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2016-12-9
收藏
得分:0 
感谢大神!!!
2016-12-10 16:58
dragonjg
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2016-12-11
收藏
得分:0 
和你一样正在做类似的。
2016-12-11 10:30
y529879803
Rank: 1
等 级:等待验证会员
帖 子:65
专家分:7
注 册:2016-11-10
收藏
得分:0 
如果只需要成品灵活的复用可以短时间内完成大部分功能。不过我那边老师没教文件的保存读取读写啥的。。。我自己复用可以做出成品但是也不是很懂。

碧蓝航线真好玩
2016-12-12 13:47
LG隐
Rank: 3Rank: 3
等 级:论坛游侠
威 望:1
帖 子:67
专家分:198
注 册:2016-4-20
收藏
得分:0 
课程设计。很有用。
2016-12-12 19:20
大灰狼咬呀咬
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2016-7-6
收藏
得分:0 
http://blog.
期末课程作业,考试管理系统,拿走不谢,只需要改一些名词。都是单链表的使用。
我猜你是大一萌星。
2016-12-15 17:39
marlow
Rank: 6Rank: 6
等 级:侠之大者
威 望:2
帖 子:125
专家分:419
注 册:2016-7-18
收藏
得分:0 
回复 楼主 appleqweewq1
学生成绩管理系统,使用双链表,实现了部分功能:
程序代码:
源文件一:
include "doubly_linked_list_node.h"

int main(void)
{
    Root root = {NULL, NULL, 0};
    stu_read(&root);
    stu_add(&root);    
    stu_delete(&root);
    dll_print(&root);
    dll_empty(&root);
    return 0;
}

源文件二:
int dll_insert(register Root *rootp, Node *nodep)
{
    register Node *thisp;
    register Node *nextp;
    register Node *newnode;
    
    //查看value 是否已经存在于链表中,如果是就返回
    //否则,为新值创建一个新节点("newnode"将指向它
    //"this"将指向应该在新节点之前的那个节点,
    //"next"将指向应该在新节点之后的那个节点
    for(thisp = (Node *)rootp; (nextp = thisp->fwd) != NULL; thisp = nextp)
        if(nextp->number == nodep->number)
            return 0;
        else if(nextp->number > nodep->number)
            break;
    newnode = (Node *)malloc(sizeof(Node));
    if(newnode == NULL)
        return -1;
    *newnode = *nodep;
    
    //把新值添加到链表中。
    newnode->fwd= nextp;
    thisp->fwd = newnode;
    
    if(thisp != (Node *)rootp)             
        newnode->bwd = thisp;
    else                           
        newnode->bwd = NULL;
        
    if(nextp != NULL)
        nextp->bwd= newnode;
    else
        rootp->bwd= newnode;
        
    rootp->value += 1;
    return 1;

 }

 
// 双链表打印程序 
void dll_print(register Root *rootp)
{
    register Node *thisp;
    
    printf("\t学号\t姓名\t性别\t学院\t科目1\t科目2\t科目3\t科目4\t科目5\t科目6\t科目7\t科目8\t科目9\t科目10\n");
    for(thisp = rootp->fwd; thisp != NULL; thisp = thisp->fwd){
        printf("\t%d", thisp->number);
        printf("\t%s", thisp->name);
        printf("\t%d", thisp->collegecode);
        printf("\t%d", thisp->sex);
        printf("\t%.2f", thisp->subject1);
        printf("\t%.2f", thisp->subject2);
        printf("\t%.2f", thisp->subject3);
        printf("\t%.2f", thisp->subject4);
        printf("\t%.2f", thisp->subject5);
        printf("\t%.2f", thisp->subject6);
        printf("\t%.2f", thisp->subject7);
        printf("\t%.2f", thisp->subject8);
        printf("\t%.2f", thisp->subject9);
        printf("\t%.2f", thisp->subject10);
        printf("\n");
    }
    if(rootp->fwd == NULL)
        printf("此表为空表!\n");
    printf("\n");
    printf("链表内共有%d名学生\n",rootp->value);
}

//双链表删除函数:从双链表中移除一个节点 
int dll_remove(Root *rootp, Node *nodep)
{
    register Node *thisp;

    if(nodep == NULL)
        return 0;
    for(thisp = rootp->fwd; thisp != NULL; thisp = thisp->fwd)
        if(thisp == nodep)
            break;
    if(thisp->fwd != NULL){   // 非链尾
        if(thisp != rootp->fwd){  //非链首 
            thisp->bwd->fwd = thisp->fwd;
            thisp->fwd->bwd = thisp->bwd;
        }
        else{                //位于链首 
            rootp->fwd = thisp->fwd;
            thisp->fwd->bwd = NULL;
        }
    }else{              //位于链尾 
        if(thisp != rootp->fwd){   //非链首 
            thisp->bwd->fwd = NULL;
            rootp->bwd = thisp->bwd;
        }
        else{              //位于链首 
            rootp->fwd = NULL;
            rootp->bwd = NULL;
        }
    }
    free(nodep);
    rootp->value -= 1;
    return 1;
}

Node *dll_find(register Root *rootp, int value)
{
    register Node *thisp;

    for(thisp = rootp->fwd; thisp != NULL; thisp = thisp->fwd)
        if(thisp->number == value)
            return thisp;
    if(thisp == NULL){
        printf("链表内没有您要查找的值!\n");
        return NULL;
    }
}

//清空双链表 
void dll_empty(register Root *rootp)
{
    register Node *thisp;
    register Node *previousp;
        
    for(thisp = rootp->fwd; thisp != NULL; free(previousp)){
        previousp = thisp;        
        thisp = thisp->fwd;
    }
    rootp->fwd = rootp->bwd = NULL;
    rootp->value = 0;
    printf("链表已清空!\n");
}

// 批量删除函数
int dll_batchdel(register Root *rootp, int frontvalue, int rearvalue)
{
    register Node *thisp, *previousp;
    register Node *frontp, *rearp;
    int i = 0;
    
    if(((frontp = dll_find(rootp, frontvalue)) == NULL) ||
         ((rearp = dll_find(rootp, rearvalue)) == NULL)){
        printf("数据库内没有您想要查找的数据!\n");
        return 0;
    }
    if(frontp != rearp){
        for(thisp = frontp; thisp != rearp; dll_remove(rootp, previousp), i++){
            previousp = thisp;
            thisp = thisp->fwd;
        }
        dll_remove(rootp, rearp);
        i++;
    }else{
        dll_remove(rootp, frontp);
        i++;
    }
    return i;
}


int dll_add(Root *rootp, Node *nodep)
{
    register Node *thisp;
    register Node *nextp;
    register Node *newnode;
    
    //查看value 是否已经存在于链表中,如果是就返回
    //否则,为新值创建一个新节点("newnode"将指向它
    //"this"将指向应该在新节点之前的那个节点,
    //"next"将指向应该在新节点之后的那个节点
    for(thisp = (Node *)rootp; (nextp = thisp->fwd) != NULL; thisp = nextp)
        if(nextp->number == nodep->number){
            printf("出现学号重复错误!\n");
            return 0;
        }
        else if(nextp->number > nodep->number)
            break;
    newnode = (Node *)malloc(sizeof(Node));
    if(newnode == NULL)
        return -1;
    *newnode = *nodep;
    //把新值添加到链表中。
    newnode->fwd= nextp;
    thisp->fwd = newnode;
    
    if(thisp != (Node *)rootp)             
        newnode->bwd = thisp;
    else                           
        newnode->bwd = NULL;
        
    if(nextp != NULL)
        nextp->bwd= newnode;
    else
        rootp->bwd= newnode;
        
    rootp->value += 1;
    return 1;
}

源文件三:
//读取学生信息函数 
int stu_read(Root *rootp)
{
    int ch;
    struct NODE    stu_node;
    FILE *fp = fopen("stuInfo.txt", "r");
    char line[200];
    
    while(fgets(line, 200, fp) != NULL){
        ch = sscanf(line,"%d%s%d%d%f%f%f%f%f%f%f%f%f%f",        //想了很多办法,终于找到sscanf()这个函数! 
                &stu_node.number, stu_node.name, &stu_node.collegecode, &stu_node.sex,
                &stu_node.subject1,&stu_node.subject2,&stu_node.subject3,&stu_node.subject4,
                &stu_node.subject5,&stu_node.subject6,&stu_node.subject7,&stu_node.subject8,
                &stu_node.subject9,&stu_node.subject10);
        printf("sscanf 返回值为:%d\n", ch);
        printf("stu_node.number is %d, name is %s\n", stu_node.number, stu_node.name);
        if(dll_add(rootp,&stu_node) == 1)
            printf("成功读取一个学生信息,并存入链表!\n");
    }
    fclose(fp);
    return rootp->value;
}

//添加学生信息函数
int stu_add(Root *rootp)
{
    int ch;
    struct NODE    stu_node;
    
    printf("请输入学生信息\n");
    printf("\t学号\t姓名\t性别\t学院\t科目1\t科目2\t科目3\t科目4\t科目5\t科目6\t科目7\t科目8\t科目9\t科目10\n");
    ch = scanf("%d%s%d%d%f%f%f%f%f%f%f%f%f%f",        //想了很多办法,终于找到sscanf()这个函数! 
        &stu_node.number, stu_node.name, &stu_node.collegecode, &stu_node.sex,
        &stu_node.subject1,&stu_node.subject2,&stu_node.subject3,&stu_node.subject4,
        &stu_node.subject5,&stu_node.subject6,&stu_node.subject7,&stu_node.subject8,
        &stu_node.subject9,&stu_node.subject10);
    dll_add(rootp, &stu_node);
    
    return ch;
}

int stu_delete(Root *rootp) //删除学生信息函数 
{
    int num;
    
    printf("请输入您想要删除学生的学号\n");
    scanf("%d", &num);
    return dll_remove(rootp, dll_find(rootp, num));
}

头文件:
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>

typedef struct NODE{
    struct NODE *fwd;
    struct NODE *bwd;
    int            number;
    char        name[20];
    int            collegecode;
    int            sex;
    float        subject1;
    float        subject2;
    float        subject3;
    float        subject4;
    float        subject5;
    float        subject6;
    float        subject7;
    float        subject8;
    float        subject9;
    float        subject10;
} Node;
typedef struct ROOT{
    struct NODE *fwd;
    struct NODE *bwd;
    int            value;
}Root;

int dll_insert(Root *rootp, Node *nodep);
void dll_print(Root *rootp);
int dll_remove(Root *rootp, Node *nodep);
Node *dll_find(Root *rootp, int value);
void dll_empty(register Root *rootp);
int dll_batchdel(register Root *rootp, int frontvalue, int rearvalue);
int dll_add(Root *rootp, Node *nodep);
int stu_read(Root *rootp);
int stu_add(Root *rootp);
int stu_delete(Root *rootp);

#endif



[此贴子已经被作者于2016-12-21 13:41编辑过]


一切都在学习、尝试、摸索中
2016-12-21 13:34
快速回复:学生成绩管理系统求助! 学生成绩管理系统求助!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.022262 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved