数据结构学生信息课程设计书
❶ 数据结构课程设计----学生信息管理系统
都已经有数据库了,是不是就是写SQL语句啊,还用什么排序法啊?直接在SQL语句里面写好不就OK?
❷ 数据结构的课程设计。求高手指教~~~编写一个简单的学生信息管理程序,能实现对学生信息的简单管理。
#include<iostream>
#include<string>
using namespace std;
struct student{
int num;
string name;
double score;
};
void ShowMenu(){
cout<<"(1) INPUT (press 1)\n"\
<<"(2) SORT (press 2)\n"\
<<"(3) QUERY (press 3)\n"\
<<"(4) EXIT (press 4)\n";
return;
}
student* INPUT(student* stu){
stu = new student[5];
for(int i=0; i<5; i++){
cout<<"请输入第"<<i+1<<"个学生的学号,姓名和总分:";
cin>>stu[i].num>>stu[i].name>>stu[i].score;
}
cout<<"\n\n";
return stu;
}
void SORT(student* stu){
if(stu == NULL){
cout<<"尚未输入学生信息!\n\n";
return;
}
for(int j=4; j>0; j--){
for(int k=4; k>4-j; k--){
if(stu[k-1].score < stu[k].score){
student tmpstu;
tmpstu.num = stu[k].num;
tmpstu.name = stu[k].name;
tmpstu.score = stu[k].score;
stu[k].num = stu[k-1].num;
stu[k].name = stu[k-1].name;
stu[k].score = stu[k-1].score;
stu[k-1].num = tmpstu.num;
stu[k-1].name = tmpstu.name;
stu[k-1].score = tmpstu.score;
}
}
}
cout<<"学生总分排名:\n";
cout<<"名次\t学号\t姓名\t总分\n";
for(int i=0; i<5; i++){
cout<<i+1<<'\t'<<stu[i].num<<'\t'<<stu[i].name<<'\t'<<stu[i].score<<endl;
}
cout<<endl;
}
void QUERY(student* stu){
if(stu == NULL){
cout<<"尚未输入学生信息!\n\n";
return;
}
int num;
cout<<"请输入学生的学号:";
cin>>num;
for(int i=0; i<5; i++){
if(num == stu[i].num){
cout<<"该生信息如下:\n";
cout<<"学号\t姓名\t总分\n";
cout<<stu[i].num<<'\t'<<stu[i].name<<'\t'<<stu[i].score<<endl;
cout<<endl;
return;
}
}
cout<<"该生不存在!\n\n";
}
int main(){
student* stu = NULL;
while(true){
ShowMenu();
char choice;
cin>>choice;
switch(choice){
case '1':
stu = INPUT(stu);
break;
case '2':
SORT(stu);
break;
case '3':
QUERY(stu);
break;
case '4':
exit(0);
default:
cout<<"错误的选项!"<<"\n\n";
break;
}
}
delete stu;
return 0;
}
❸ 求一份学生管理系统课程设计报告,数据结构课程设计
|”为什么要中间拿那么多空格隔开呢?逗号或“|”都比那好弄。
如果这题是老师出的,老师一定脑袋有问题。
//==============
效果图查询自己写
需要的控件
private System.Windows.Forms.Button button1;
private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.RichTextBox richTextBox2;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.GroupBox groupBox3;
后台
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Text;
using System.IO;
namespace WindowsFormsApplication1
{
public partial class cj : Form
{
public StreamWriter SW;
public cj()
{
InitializeComponent();
string Header = "姓名" + " " + "学号" + " " + "语文" + " " + "数学" + " " + "英语" + "
";
richTextBox1.AppendText(Header);
richTextBox2.AppendText(Header);
CheckDirectory();
}
private void button1_Click(object sender, EventArgs e)
{
string strFile;
strFile = System.Windows.Forms.Application.StartupPath + "\3.txt";
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.Filter = "文本文件(*.txt)|*.txt";
openFileDialog1.DefaultExt = "txt";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
string FileName = openFileDialog1.FileName;
if (Path.GetExtension(FileName) != ".txt")
{
MessageBox.Show("格式不对");
}
else
{
FileStream stream = new FileStream(openFileDialog1.FileName, FileMode.Open, FileAccess.Read);
StreamReader sReader = new StreamReader(openFileDialog1.FileName, Encoding.Default);
if (sReader.ReadLine().Split('
').Length > 0)
{
richTextBox1.AppendText(sReader.ReadToEnd());
}
richTextBox1.AppendText("
");
// StreamWriter ssw = new System.IO.StreamWriter(FileName, true, System.Text.Encoding.Default);
}
}
}
private void WriteLog(string msg)
{
string strFile;
strFile = System.Windows.Forms.Application.StartupPath + "\data\3.log";
// StreamWriter SW;
try
{
SW = new System.IO.StreamWriter(strFile, true);
SW.WriteLine(msg);
}
catch (Exception ex)
{
WriteLog(ex.Message);
}
finally
{
SW.Flush();
SW.Close();
}
}
private void button2_Click(object sender, EventArgs e)
{
richTextBox1.Text = "姓名" + " " + "学号" + " " + "语文" + " " + "数学" + " " + "英语" + "
";
}
private void CheckDirectory()
{
if (Directory.Exists(System.Windows.Forms.Application.StartupPath + "\data") == false)
{
Directory.CreateDirectory(System.Windows.Forms.Application.StartupPath + "\data");
}
if (Directory.Exists(System.Windows.Forms.Application.StartupPath + "\data") == false)
{
Directory.CreateDirectory(System.Windows.Forms.Application.StartupPath + "\data");
}
}
private void button3_Click(object sender, EventArgs e)
{
string rowdata = "";
int m = richTextBox1.Lines.Length;
string[] lines = new string[m];
for (int i = 1; i < m-1; i++) //每一行
{
lines[i] = richTextBox1.Lines[i]+"
";
string[] cj = lines[i].Split(' ');
if (cj != null)
{
rowdata = " ";
for (int j = 0; j < cj.Length; j++) //每一列
{
if (cj[j].ToString() != "")
{
rowdata = rowdata + cj[j].ToString()+",";
}
}
rowdata.TrimEnd(',');
string[] ncj = rowdata.Split(',');
string str2 = ncj[2].ToString();
string str3 = ncj[3].ToString();
string str4 = ncj[4].ToString().TrimEnd('
');
// if ((int.Parse(str2) + int.Parse(str3) + int.Parse(str4) < 180))
if ((int.Parse(str2)<60 || int.Parse(str3)<60 || int.Parse(str4) < 60))
{
richTextBox2.AppendText(lines[i]);
}
}
}
if (File.Exists(System.Windows.Forms.Application.StartupPath + "\data\3.txt") == true)
{
File.Delete(System.Windows.Forms.Application.StartupPath + "\data\3.txt");
}
File.AppendAllText(System.Windows.Forms.Application.StartupPath + "\data\3.txt", richTextBox1.Text);
if (File.Exists(System.Windows.Forms.Application.StartupPath + "\data\4.txt") == true)
{
File.Delete(System.Windows.Forms.Application.StartupPath + "\data\4.txt");
}
File.AppendAllText(System.Windows.Forms.Application.StartupPath + "\data\4.txt", richTextBox2.Text);
MessageBox.Show("数据合成OK,在data文件夹");
}
}
}
❹ 数据结构课程设计:学生信息管理系统。
不免费代做
❺ 数据结构课程设计 图书管理系统
#include<stdio.h>
#include<string.h>
#include<conio.h>
#include<stdlib.h>
#define N sizeof(struct book)
#define PT "%-5d %10s %6s %6s %8s %3d \n",p->num,p->name,p->where,p->author,p->pub,p->count
struct book /*图书信息*/
{
int num; /*书号*/
char name[10]; /*书名*/
char where[10]; /*所在书库*/
char author[15]; /*作者*/
char pub[20]; /*出版社*/
int count; /*数量*/
struct book *next;
};
/*输出模块*/
void print(struct book *p0)
{
struct book *p;
p=p0->next;
printf("\n\n\t\t^^^^^^^^^^^^^^图书信息表^^^^^^^^^^^^^^");
printf("\n\n图书编号---图书名称---所在书库----作者----出版社---数量\n");
while(p!=NULL)
{
printf(PT);
p=p->next;
}
getch();
}
/*输入模块*/
struct book *creat()
{
struct book *head,*p1,*p2;
int i=0;
head=p2=(struct book *)malloc(N);
head->next=NULL;
printf("\n\n\t\t录入图书信息");
printf("\n\t---------------------------------------");
while(1)
{ p1=(struct book *)malloc(N);
printf("\n 请输入图书编号(书号为0结束): ");
scanf("%d",&p1->num);
if(p1->num!=0)
{
printf("\n\n书名 所在书库 作者 出版社 图书数量\n");
scanf("%s%s%s%s%d",p1->name,p1->where,p1->author,p1->pub,&p1->count);
p2->next=p1;
p2=p1;
i++;
}
else
break;
}
p2->next=NULL;
free(p1);
printf("\n\t\t----------------------------------------");
printf("\n\t\t %d 种书录入完毕",i);
getch();
return head;
}
/*查找模块*/
void find(struct book *p0)
{
char name[10];
int flag=1;
struct book *p;
p=p0->next;
printf("请输入要查找的书名:\n");
scanf("%s",name);
for(p=p0;p;p=p->next)
if(strcmp(p->name,name)==0)
{
printf("\n\n图书编号---图书名称---所在书库----作者----出版社---数量\n");
printf(PT);
flag=0;
break;
}
if(flag) printf("\n 暂无此图书信息\n");
getch();
}
/*删除模块*/
void del(struct book *p0)
{
char name[10];
int flag=1;
struct book *p;
p=p0;
printf("请输入要删除的书名:\n");
scanf("%s",name);
while(p!=NULL)
{
if(strcmp(p->name,name)==0)
{
p0->next=p->next; /*后续节点连接到前驱节点之后*/
free(p);
printf("\t该书资料已删除.");
flag=0;
break;
}
p0=p;
p=p->next;
}
if(flag) printf("\n\t无此图书信息。");
getch();
}
/*增加模块*/
void insert(struct book *p0)
{
struct book *p;
p=(struct book *)malloc(N);
while(1)
{
printf("\n 请输入要增加的图书编号(书号为0 退出): ");
scanf("%d",&p->num);
if(p->num!=0)
{
if(p0->next!=NULL&&p0->next->num==p->num) /*找到重号*/
{
p=p->next;
free(p);
printf("\t该书已存在");
}
else
{printf("\n\n书名 所在书库 作者 出版社 图书数量\n");
scanf("%s%s%s%s%d",p->name,p->where,p->author,p->pub,&p->count);
p->next=p0->next;
p0->next=p;
printf("\t已成功插入.");
}
}
else
break;
}
getch();
}
/*修改模块*/
void modify(struct book *p0)
{
char name[10];
int flag=1;
int choice;
struct book *p;
p=p0->next;
printf("请输入要修改的书名:\n");
scanf("%s",name);
while(p!=NULL&&flag==1)
{
if(strcmp(p->name,name)==0)
{
printf("\n\t请选择要修改的项:");
printf("\n\t 1.修改图书编号\n");
printf("\n\t 2.修改图书所在书库\n");
printf("\n\t 3.修改图书作者\n");
printf("\n\t 4.修改图书出版社\n");
printf("\n\t 5.修改图书库存量\n");
scanf("%d",&choice);
switch(choice)
{
case 1: { printf("\n 请输入新的图书编号:");
scanf("%d",p->num); break;
}
case 2: { printf("\n 请输入新的图书书库:");
scanf("%s",p->where); break;
}
case 3: { printf("\n 请输入新的图书作者:");
scanf("%s",p->author); break;
}
case 4: {printf("\n 请输入新的图书出版社:");
scanf("%s",p->pub); break;
}
case 5: {printf("\n 请输入新的图书库存量:");
scanf("%d",p->count); break;
}
}
printf("\n\t该项已成功修改。\n\t 新的图书信息:");
printf("\n\n图书编号---图书名称---所在书库----作者----出版社---数量\n");
printf(PT);
flag=0;
}
p0=p;
p=p0->next;
}
if(flag) printf("\n\t暂无此图书信息。");
getch();
}
/*读文件*/
struct book *read_file()
{
int i=0;
struct book *p,*p1,*head=NULL;
FILE *fp;
if((fp=fopen("library.txt","rb"))==NULL)
{printf("\n\n\n\n\n \t********库文件不存在,请创建!**********");
getch();
return NULL;
}
head=(struct book *)malloc(N);
p1=head;
head->next=NULL;
printf("\n 已有图书信息:");
printf("\n\n图书编号---图书名称---所在书库----作者----出版社---数量\n");
while(!feof(fp))
{
p=(struct book *)malloc(N); /*开辟空间以存放的取得信息*/
while(fscanf(fp,"%d%s%s%s%s%d",&p->num,p->name,p->where,p->author,p->pub,&p->count)!=EOF)
{
printf(PT);
i++;
}
p1->next=p;
p1=p;
}
p1->next=NULL;
fclose(fp);
printf("\n 共种%d 图书信息",i);
printf("\n\n\n 文件中的信息以正确读出。按任意键进入主菜单。");
getch();
return (head);
}
/*保存文件*/
void save(struct book *head)
{
FILE *fp;
struct book *p;
fp=fopen("library.txt","wb"); /*以只写方式打开二进制文件*/
if(fp==NULL) /*打开文件失败*/
{
printf("\n=====>打开文件失败!\n");
getch();
return ;
}
else
for(p=head->next;p!=NULL;p=p->next)
fprintf(fp,"%d %s %s %s %s %d\n",p->num,p->name,p->where,p->author,p->pub,p->count);
fclose(fp);
printf("\n\t保存文件成功!\n");
}
void main()
{
struct book *head=NULL;
int choice=1;
head=read_file();
if(head==NULL)
{
printf("\n\t\t**********");
getch();
head=creat();
}
do
{
system("cls");
printf("\t\t----------Welcome---------\n");
printf("\n\n\t欢迎您,图书管理员.\n");
printf("\n\n\n\n\n");
printf("\n\t 请选择:");
printf("\n\t 1.查询图书信息\n");
printf("\n\t 2.修改图书信息\n");
printf("\n\t 3.增加图书信息\n");
printf("\n\t 4.删除图书信息\n");
printf("\n\t 5.显示所有图书信息\n");
printf("\n\t 0.退出系统\n");
scanf("%d",&choice);
switch(choice)
{
case 1: find(head); break;
case 2: modify(head); break;
case 3: insert(head); break;
case 4: del(head); break;
case 5: print(head); break;
case 0: system("cls");
printf("\n\n\n\n\n\t^^^^^^^^^^谢谢使用,再见^^^^^^^^^^!\n\n");
break;
}
}while(choice!=0);
save(head);
}
❻ 数据结构课程设计-学生成绩管理系统的设计
好像没有数据结构的 你试试c++语言面向对象程序设计课程设计
这个网站能免费下几个,不能版免费下的就要收权费了
本站免费计算机课程设计论文下载
本人原创计算机类课程设计免费下载,销售计算机毕业论文
请把我的网站介绍给同学们.谢谢支持本站
ACCESS课程设计库存管理工资管理系统 sqlserver数据库课程设计 c++语言面向对象程序设计课程设计 vb课程设计学生成绩系统
asp留言板(没有论文) 计算机实训计算机组装与维护课程设计
简单的网页设计没有论文 office课程设计 操作系统课程设计
另有以上没有列出的计算机课程设计为收费材料30元一份 更多