完整版c语言毕业课程设计.docx

上传人:b****6 文档编号:7841491 上传时间:2023-01-26 格式:DOCX 页数:27 大小:21.95KB
下载 相关 举报
完整版c语言毕业课程设计.docx_第1页
第1页 / 共27页
完整版c语言毕业课程设计.docx_第2页
第2页 / 共27页
完整版c语言毕业课程设计.docx_第3页
第3页 / 共27页
完整版c语言毕业课程设计.docx_第4页
第4页 / 共27页
完整版c语言毕业课程设计.docx_第5页
第5页 / 共27页
点击查看更多>>
下载资源
资源描述

完整版c语言毕业课程设计.docx

《完整版c语言毕业课程设计.docx》由会员分享,可在线阅读,更多相关《完整版c语言毕业课程设计.docx(27页珍藏版)》请在冰豆网上搜索。

完整版c语言毕业课程设计.docx

完整版c语言毕业课程设计

摘要

该系统主要是介绍超市进销存管理信息系统的环境、功能作用、所用到的语言、设计的方案等各方面的内容。

主要是让使用者了解此系统,使他们能更好的运用本系统,使此系统发挥出应有的作用。

本系统运用计算机管理信息技术,对超市的进销存过程进行详细的分析,实现了对超市的进货、出售和库存的科学管理。

本系统主要包括以下几大模块:

输入单据:

出库、入库、物品清单;查询:

数量查询、价格查询、生产地查询。

关键词 :

销售;管理信息系统;C语言

 

 

Abstract

Thistextmainlyintroducesthesupermarketandenterstosellsuchcontentsofvariousfieldsastheenvironmentwhichstoresthemanagementinformationsystem,schemeonthefunction,language,designused,etc..Letuserfindoutaboutsystemthis,enablethemfineapplicationthissystemmainly,makethissystemgiveplaytoduefunction.Thissystemusestheinformationtechnologyofcomputermanagement,sellthecourseofstoringtocarryondetailedanalysistotheenteringofthesupermarket,storetothesupermarket.

Thissystemismajorandincludesfollowingseveralbigmodules:

Theinputreceipts:

 Thewarehouseisgoneouttobeputinstoragethattheproductendproductdetailedlistisinquiredabout:

 Thereportformbeingputinstorageisgoneoutthereportformproductendproductdetailedlistreportforminwarehousetoselltomovebackthemoneylistreportformtoadvance.

keywords:

 Sell ;managementinformationsystem ;Clanguage

1概述1

1.1设计思想1

1.2设计原则1

1.3性能需求1

2总体设计2

2.1系统功能设计图2

2.2系统功能设计2

2.2.1系统颜色模块功能3

2.2.2销售管理模块功能3

2.2.3进货管理模块功能3

2.2.4库存管理模块功能3

2.3系统模块的运用方法3

2.3.1输入记录模块3

2.3.2查询记录模块3

2.3.3输出记录模块3

3详细设计使用4

3.1数据定义4

3.2主函数流程图5

3.3源程序7

4调试分析8

4.1进入主界面8

4.2系统菜单界面8

4.3商品信息查询窗口10

5总结11

参考文献12

致谢13

附件14

1概述

1.1设计思想

(1)系统分成几个相对独立的模块,但这些模块都进行集中式管理。

(2)分层的模块化程序设计思想,整个系统采用模块化结构设计作为应用程序,有较强的可操作性和扩展性。

(3)合理的数据设计,在应用系统设计中,相对独立的模块间以数据相互连接,使各模块间的耦合性较低,方便系统运行,提高系统安全性。

1.2设计原则

为了使本系统功能齐全完备,操作简便,最大限度的提高软件的质量,从而满足用户的实际需要,在设计开发过程中遵循了如下原则:

(1)合法性原则:

依据产品核算系统的工作规定以及要求,参照核算实际的工作情况,进行诸如产品进货、销售等工作。

(2)实用性原则:

适合产品信息管理工作的实际需求,并能够处理一些特殊情况的要求,此外,尽可能预留空间,以便扩充功能。

(3)准确性原则:

对输入的相关资料建立检错机制,及时报错,使用户能够及时准确的输入合法资料(如:

类型匹配,长度不超限等)。

(3)易操作原则:

要求设计的系统功能齐全,界面友好,操作方便,必要的地方进行提示。

(5)源程序可读性原则:

为了便于其他设计,维护人员读懂代码或以后的代码修改,软件升级维护,即可能做好代码注释工作。

1.3性能需求

(1)数据精确度

产品的进货单和销售单中,单价、金额采用浮点数,保留至小数点后两位。

2总体设计

2.1系统功能设计图

图2-1超市管理系统功能结构

2.2系统功能设计

系统功能设计是使整个系统能基本实现超市的进、销、存等管理功能,能让超市管理者更直观的了解超市的经营状况,以做出相应的经营决策。

管理信息系统(MIS)就是进行信息的收集、传送、存储、编制成各种凭证、报表、台帐、图形等信息,同时对这些信息进行维护,通过实测超市的各种运行情况,并利用过去的历史数据预测未来的发展,从超市全局的角度出发进行决策,利用信息控制超市的行为,辅助超市完成其目标。

本系统共包括四大模块,分别是系统颜色模块,销售管理模块,进货管理模块,库存管理模块。

每个模块的功能如下:

2.2.1系统颜色模块功能

(1)实现系统颜色转换;

(2)查看系统颜色;

2.2.2销售管理模块功能

(1)实现销售信息的查询;

(2)实现商品销售信息的盘点。

2.2.3进货管理模块功能

(1)实现进货信息的查询;

(2)实现进货信息的更新,包括增加、删除、修改功能。

2.2.4库存管理模块功能

(1)实现商品信息的查询;

(2)实现商品信息的更新,包括增加、删除、修改功能;

(3)实现库存信息的查询;

(4)实现库存信息的更新,包括增加、删除、修改功能。

2.3系统模块的运用方法

2.3.1输入记录模块

输入记录模块的功能:

输入各种商品的信息;

2.3.2查询记录模块

查询记录模块的功能:

查询各种商品的信息;

2.3.3输出记录模块

输出记录模块的功能:

输出各种商品的信息;

3详细设计使用

3.1数据定义

使用C语言创建的结构体和定义的函数如下:

#include

voidchushou(intcount);

voidAppend();

voidSelldelete();

voidAmend();

voidFindin();

voidBrowse();

voidcolorsetting();

voidEndprogram();

voidzonghe();

structproduce_node*lianbiao();

structproduce_node*Create_produce_Doc();

structproduce_node*InsertDoc(structproduce_node*();

voidchushou(intcount);

voidAppend();

voidSelldelete();

voidAmend();

voidFindin();

voidBrowse();

voidcolorsetting();

voidEndprogram();

voidzonghe();

structproduce_node*lianbiao();

structproduce_node*Create_produce_Doc();

structproduce_node*InsertDoc(structproduce_node*∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞【小型超市管理系统】∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞\n");

printf("系统菜单显示如下");

printf("\n\t1=====================【新购商品入库】\n");

printf("\n\t2=====================【商品信息删除】\n");

printf("\n\t3=====================【商品信息修改】\n");

printf("\n\t4=====================【商品信息查询】\n");

printf("\n\t5=====================【商品信息浏览】\n");

printf("\n\t6=====================【系统颜色设置】\n");

printf("\n\t7=====================【应用程序退出】\n");

printf("\n\t8=====================【商品价值总和浏览】\n");

printf("\n\t9=====================【商品的出售管理】\n");

printf("\n\t10====================【商品的预计的利润】\n");

printf("\n\t请输入您要选择的菜单......");

scanf("%d",&choice);

switch(choice)

{

case1:

Append();

break;

case2:

Selldelete();

break;

case3:

Amend();

break;

case4:

Findin();

break;

case5:

Browse();

break;

case6:

colorsetting();

break;

case7:

Endprogram();

break;

case8:

zonghe();

break;

case9:

{inti;

printf("请输入您要卖出的数量:

");

scanf("%d",&i);

chushou(i);}

break;

case10:

liren();

break;

default:

printf("\n\t\t\t\t\t输入无效,请您重新输入......");

getch();

system("cls");

menu();

}

}

voidcolorsetting()

{inta;

charchoice;

system("cls");

printf("\n\n\t\t选择以下方案\n");

printf("\n\n\t\t1**************红底黑字\n");

printf("\n\n\t\t2**************白底黑字\n");

printf("\n\n\t\t3**************黑底红字\n");

printf("\n\n\t\t4**************绿底蓝字\n");

printf("\n\n\t\t5**************黄底紫字\n");

printf("\n\n\t\t6**************系统默认\n");

printf("\n\n\t\t\t\t\t请挑选您喜爱的颜色<1-5>......");

scanf("%d",&a);

switch(a)

{

case1:

system("color40");

break;

case2:

system("color70");

break;

case3:

system("color04");

break;

case4:

system("color21");

break;

case5:

system("color65");

break;

case6:

system("color1a");

break;

default:

printf("\n\n\t\t\t\t\t输入无效,重新输入......");

getch();

colorsetting();

}

printf("\n选择的颜色您还满意吗?

(y返回主菜单n继续选择)");

scanf("%c",&choice);

if(choice=='Y'||choice=='y')

{

system("cls");

menu();

}

else

{

colorsetting();

}

}

intvalidateID(intid)

{

FILE*fp;

structimai;

fp=fopen("ima.date","r");

if(fp==NULL)

{

printf("\t\t\t系统错误,请您重试........");

exit(0);

}

fread(&i,sizeof(structima),1,fp);

while(!

feof(fp))

{

if(i.id==id)

{

fclose(fp);

return1;

break;

}

fread(&i,sizeof(structima),1,fp);

}

fclose(fp);

return0;

}

voidAppend()

{

structproduce_node*i;

structproduce_nodej;

charchoice;

FILE*fp;

fp=fopen("ima.date","ab");

i=&j;

if(fp==NULL)

{

printf("\t\t\t系统错误,请您重试........");

exit(0);

}

labID:

printf("\n\t请您输入要入库商品的信息...\n");

printf("\t\t\t\t商品的编号:

");

scanf("%d",&j.id);

if(validateID(j.id)==1)

{

printf("\t\t\t\t此编号已被使用,请您重新输入......\n");

gotolabID;

}

else

printf("****************************此编号没有被使用您可以使用**********************************\n");

i=lianbiao();

while(i!

=NULL)

{

fwrite(i,sizeof(structproduce_node),1,fp);

i=i->next;

}

fclose(fp);

printf("\t\t\t\t\t\t商品信息已入库成功!

!

!

\n");

free(i);

printf("\n您想继续吗?

(yn)");

scanf("%c",&choice);

if(choice=='Y'||choice=='y')

{

Append();

}

else

{

system("cls");

menu();

}

}

voidSelldelete()

{structimai[1000];

structimatemp;

intdelID;

charchoice;

intindex=0;

intj=0;

FILE*fp;

fp=fopen("ima.date","r");

if(fp==NULL)

{

printf("\t\t\t系统错误,请您重试........");

exit(0);

}

fread(&temp,sizeof(structima),1,fp);

while(!

feof(fp))

{

i[index]=temp;

index++;

fread(&temp,sizeof(structima),1,fp);

}

fclose(fp);

printf("\n\t请输入要删除的商品的编号:

");

scanf("%d",&delID);

fopen("ima.date","w");*打开文件*

if(fp==NULL)

{

printf("\t\t\t系统错误,请您重试........");

exit(0);

}

for(j=0;j

{

if(i[j].id!

=delID)

{

fwrite(&i[j],sizeof(structima),1,fp);

}

}

fclose(fp);

printf("\t\t\t\t\t商品信息已清除!

!

!

\n");

printf("\n您想继续吗?

(yn)");

scanf("%c",&choice);

if(choice=='Y'||choice=='y')

{

Selldelete();

}

else

{

system("cls");

menu();

}

}

voidAmend()

{intindex=0;

intID,j;

charchoice;

structimai[1000];

structimatemp;

FILE*fp;

fp=fopen("ima.date","r");

if(fp==NULL)

{

printf("\t\t\t系统错误,请您重试........");

exit(0);

}

fread(&temp,sizeof(structima),1,fp);

while(!

feof(fp))

{

i[index]=temp;

index++;

fread(&temp,sizeof(structima),1,fp);

}

fclose(fp);

fp=fopen("ima.date","w");

if(fp==NULL)

{

printf("\\t\t\t系统错误,请您重试........");

exit(0);

}

printf("\n\t请输入要修改的信息的商品的编号:

");

scanf("%d",&ID);

for(j=0;j<=index-1;j++)

{

if(i[j].id!

=ID)

{

fwrite(&i[j],sizeof(structima),1,fp);

}

else

{

printf("\t\t商品名称修改为:

");

scanf("%s",i[j].name);

printf("\t\t商品生产地修改为:

");

scanf("%s",i[j].produce);

printf("\t\t商品数量修改为:

");

scanf("%d",&i[j].number);

printf("\t\t商品进货单价修改为:

");

scanf("%lf",&i[j].price);

printf("\t\t商品出售单价修改为:

");

scanf("%lf",&i[j].price1);

fwrite(&i[j],sizeof(structima),1,fp);

}

}

fclose(fp);

printf("\t\t\t\t商品信息已修改......");

printf("\n您想继续吗?

(yn)");

scanf("%c",&choice);

if(choice=='Y'||choice=='y')

{

Amend();

}

else

{

system("cls");

menu();

}

}

voidFindin()

{

inta=0;

FILE*fp;

intfindID;charchoice;structimai;

fp=fopen("ima.date","r");

if(fp==NULL)

{

printf("\t\t\t系统错误,请你重试........");

exit(0);

}

printf("\n\t请输入要查询的商品的编号..");

scanf("%d",&findID);

fread(&i,sizeof(structima),1,fp);

while(!

feof(fp))

{

if(i.id==findID)

{

a=1;

printf("\n\n\t***************商品信息******************");

printf("\n\t商品编号...%30d\n",i.id);

printf("\n\t-----");

printf("\n\t商品名称...%30s\n",i.name);

printf("\n\t-----");

printf("\n\t生产厂家...%30s\n",i.produce);

printf("\n\t-----");

printf("\n\t进口数量...%30d\n",i.number);

printf("\n\t-----");

printf("\n\t进货价格...%30.3f\n",i.price);

printf("\n\t-----")

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 经管营销 > 经济市场

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1