大学生信息管理系统的c++课程设计怎么写

mm18222901526 2012-06-28 11:32:21
大学生信息管理系统的c++课程设计怎么写

计算机软件技术基础(VC)
课程设计任务书

一、题目:17大学生信息管理系统
二、目的与要求
1. 目的
培养学生综合利用C++语言进行程序设计的能力,培养学生的编程能力、用计算机解决实际问题的能力,加强对理论知识的理解和实际运用;培养学生对软件工程知识和方法的初步认识,提高软件系统分析能力和程序文档建立、归纳总结的能力;提高学生的实际动手能力和独立思考的能力。
2. 基本要求
(1) 用C++语言编程,在Visual C++环境下调试完成;
(2) 使用结构数组,各个功能分别使用函数来完成。
(3) 源代码程序要有必要的注释。
三、设计方法和基本原理
1.课题功能描述
本课题要求设计一个大学生信息管理系统,主要包括学生信息的录入、修改、排序、删除、查询和浏览。
2. 问题详细描述
大学生信息包括:学号、姓名、出生日期、性别、专业、联系电话、简历。
大学生信息管理系统功能主要包括:录入学生信息;按照姓名查询学生信息;修改学生信息;删除学生信息;按照学号排序学生信息;浏览学生信息。
要求提供一个主界面实现大学生信息管理系统的主菜单并调用各个功能,调用界面和各个功能的操作界面应尽可能清晰美观。要求系统主界面如下形式:
----------欢迎使用大学生信息管理系统主菜单-----------
录入学生信息,请选择:1
查询学生信息,请选择:2
修改学生信息,请选择:3
删除学生信息:请选择:4
排序学生信息:请选择:5
浏览学生信息,请选择:6
退出,请选择:0

3. 问题的解决方案
(1) 构造大学生信息的结构,采用结构体类型定义大学生信息的结构。
(2) 定义结构数组存储大学生信息记录;
(3) 为实现程序的功能,学生信息管理系统的主界面和各个功能可分别用函数来实现,在主函数中完成各个函数的调用。
四、主要技术问题的描述
(1) 分支和循环结构的使用,结构数组的使用。
(2) 函数调用
五、课程设计的考核方式及评分方法
1.考核方式
(1) 学生要提交书面课程设计报告(A4纸打印);并将设计报告的电子文档、.cpp源文件和.h头文件上传到所对应班级的学生名称相应文件夹中。如果上传后有修改,文件名注意添加“最终版”字样。
(2) 课程设计结束时,在机房当场验收。教师提供测试数据,由学生运行所设计的系统,检查运行结果是否正确,并回答教师提出的有关问题。
2.评分方法
根据出勤率、课程设计期间纪律、课程设计运行结果、课程设计报告及答辩情况综合评分。
六、书写设计报告的要求(详细内容见“设计报告模板”)。
七、说明:课程设计的有关文档“设计报告模板”和“课程设计要求”请在下载任务书处下载。


很急,本周五用
...全文
818 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
zxqw3366 2012-10-23
  • 打赏
  • 举报
回复
1楼好样的
喜洋洋呵呵 2012-06-28
  • 打赏
  • 举报
回复
楼上的这么热心,你把分给他吧
kingkingking 2012-06-28
  • 打赏
  • 举报
回复
//完成80%了,程序都能运行,还有一点功能没有加进去,自己加吧,另外写的比较匆忙,肯定有不完善的地方,希望完善哦!

#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>

typedef struct students
{
//学号、姓名、出生日期、性别、专业、联系电话、简历
int num;
char name[100];
char birth[100];
char sex[100];
char specialty[100];
char phone[100];
char resume[100];
struct students *next;
}student;

void Menu();
void Show(student *head);
void Find(student *head);
void Insert(student *head);
void Delete(student *head);

void sonInsert(student *theNew);

int main()
{
student *head;
student *p;
head =(student *)malloc(sizeof(student));
p = head;
//初始化
head->num = 0; //学号
strcpy(head->name,"姓名");
strcpy(head->birth ,"出生年月");
strcpy(head->sex , "性别");
strcpy(head->specialty , "专业");
strcpy(head->phone , "电话");
strcpy(head->resume , "简历");
head->next = NULL;

while(1)
{
Menu();
char temp[100];
gets(temp);
int i = atoi(temp);
switch(i)
{
case 1:
//浏览
Show(head);
printf("\r\n");
break;
case 2:
//查询
Find(head);
printf("\r\n");
break;
case 3:
//添加
Insert(head);
printf("\r\n");
break;
case 4:
//删除
Delete(head);
printf("\r\n");
break;
case 0:
exit(0);
}
}
printf("Press any key continue...\n");
return 0;
}

void Menu()
{
printf("欢迎使用大学生信息管理系统主菜单\r\n");
printf("浏览学生信息,请选择:1\r\n");
printf("查询学生信息,请选择:2\r\n");
printf("添加学生信息,请选择:3\r\n");
printf("删除学生信息:请选择:4\r\n");
printf("退出,请选择:0 \r\n");
}

//浏览
void Show(student *head)
{
student *p;
p=head;
while(p!=NULL)
{
printf("\r\n");
printf("%8d,%8s,%8s,%8s,%8s,%8s,%8s\r\n",p->num,p->name,p->birth,p->sex,p->specialty,p->phone,p->resume);
p = p->next;
}
}

//查询
void Find(student *head)
{
printf("请输入要查询学生的学号:");
char temp[100];
gets(temp);
int number = atoi(temp);
student *p;
p = head;
int i = 0;
while (p!=NULL)
{
if (p->num == number)
{
printf("%d,%8s,%8s,%8s,%8s,%8s,%8s\r\n",p->num,p->name,p->birth,p->sex,p->specialty,p->phone,p->resume);
break;
}
else
{
p = p->next;
}
}
if (p == NULL)
{
printf("没有查询到所需信息!\r\n");
}
}

//添加
void Insert(student *head)
{
student *headTemp;
headTemp = head;
student *p;
student *theNew;
char temp[100];
theNew = (student *)malloc(sizeof(student));
printf("输入学号(整数):");
gets(temp);
int number = atoi(temp);
theNew->num = number;
if (number < (headTemp->num)) //学号排在最前
{
sonInsert(theNew);
theNew ->next = headTemp;
}
else
{
for (p = head;p != NULL;p = p->next)
{
if (p->num == number)
{
printf("此学号已添加\r\n");
}
else if ( ((p->num))<number && number<(p->next!=NULL) ) //学号排在中间
{
sonInsert(theNew);
p->next = theNew;
theNew->next = p->next;
break;
}
else if ( (p->num)<number && p->next==NULL ) //学号排在最后
{
sonInsert(theNew);
p->next = theNew;
theNew->next = NULL;
break;
}
}
}
};

//添加函数的子函数
void sonInsert(student *theNew)
{
char tempName[10000],tempBirth[100],tempSex[100],tempSpecialty[100],tempPhone[100],tempResume[100];
printf("输入姓名:");
gets(tempName);
printf("输入出生年月:");
gets(tempBirth);
printf("输入性别:");
gets(tempSex);
printf("输入专业:");
gets(tempSpecialty);
printf("输入电话:");
gets(tempPhone);
printf("输入简历:");
gets(tempResume);
strcpy(theNew->name,tempName);
strcpy(theNew->birth ,tempBirth);
strcpy(theNew->sex , tempSex);
strcpy(theNew->specialty, tempSpecialty);
strcpy(theNew->phone , tempPhone);
strcpy(theNew->resume , tempResume);
printf("添加完成!");
printf("\r\n");
}

//删除
void Delete(student *head)
{
printf("请输入要删除学生的学号:");
char temp[100];
gets(temp);
int number = atoi(temp);
student *p,*q;
q = head;
for (q = head ;q !=NULL;q = q->next)
{
p = q->next;
if ( p->num == number)
{
q->next = p->next;
free(p);
printf("已删除!\r\n");
printf("\r\n");
break;
}
else
{
printf("没有找到!\r\n");
break;
}
}
}
kingkingking 2012-06-28
  • 打赏
  • 举报
回复
我来做,等着啊

65,186

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧