欢迎来到三一文库! | 帮助中心 三一文库31doc.com 一个上传文档投稿赚钱的网站
三一文库
全部分类
  • 研究报告>
  • 工作总结>
  • 合同范本>
  • 心得体会>
  • 工作报告>
  • 党团相关>
  • 幼儿/小学教育>
  • 高等教育>
  • 经济/贸易/财会>
  • 建筑/环境>
  • 金融/证券>
  • 医学/心理学>
  • ImageVerifierCode 换一换
    首页 三一文库 > 资源分类 > DOC文档下载  

    汽车销售管理系统设计报告.doc

    • 资源ID:3287834       资源大小:121.01KB        全文页数:14页
    • 资源格式: DOC        下载积分:4
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录 QQ登录   微博登录  
    二维码
    微信扫一扫登录
    下载资源需要4
    邮箱/手机:
    温馨提示:
    用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP免费专享
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    汽车销售管理系统设计报告.doc

    西安郵電學院軟體設計報告題 目:汽車銷售管理系統院系名稱:電子工程學院 專業名稱:光電資訊工程班 級:光電1101班 學生姓名:學號(8位):指導教師:設計起止時間:1512年04月12日1512年04月19日一. 设计目的随着近年来我国经济的发展,国民生活水平的提高,国内的汽车产业开始迅猛发展,人民群众对于各种汽车的需求也是日益增多,也因此产生了很多汽车销售公司。在这些汽车销售公司你,他们都没有一套好的销售模式。因此,制作一套汽车销售管理系统有助于公司对汽车的管理、销售、提高利润,并且方便了客户查看汽车的信息、购买汽车,也更加了解各种汽车的性能和使用性。选择适合自己的汽车。二. 设计内容第一步:需求分析 主要任务就是通过详细调查现实世界要处理的对象,明确用户的各种需求,然后在此基础上确定新系统的功能。在我设计的这个系统主要是调查客户对汽车的需求情况,客户想了解汽车的哪些信息,有哪些要求等等。第二步:概念结构设计 主要就是将需求分析阶段得到的用户需求抽象为信息世界的结构才能更好的用数据库管理系统来实现这些需求。第三步:对汽车销售管理系统进行管理和维护。三概要设计1功能模块图;功能模块图:主菜單查詢退出流覽排序計算編輯輸入 添加銷售資料刪除銷售資料修改銷售資料輸入銷售員資料輸入產品資料輸入銷售總數據按產品編號查詢按銷售員編號查詢2各个模块详细的功能描述。1)主函数main():协调各个模块的顺序,让程序井然有序地按照事先安排的进行。2)欢迎接口函数welcome():作为程序的第一形象,欢迎用户使用本程序。3)输入数据函数void input():读取数据,为之后的程序运行提供了数据基础。4)输入销售员数据函数void input1():读取数据,与数字数据有所不同,是记录有关销售员信息的字符数据。5)输入销售数据函数void input3():读取数据,有关于销售的资料。6)删除销售数据函数void Delete():在取消本次销售或者本次销售出现任何问题时使用,可以对数据进行清除,在编辑数据时使用。7)插入销售数据函数void insert():对于一名销售员来说有可能一次完成多次销售,此时用插入数据函数可以将几次销售记录在一起,在编辑数据时使用。8)修改销售数据函数void modify():管理数据时对数据可以进行任何修改,在编辑资料时使用。9)计算销售总额和每种产品的销售额void calculat():便于日后对销售额和利润进行计算。10)根据销售员编号来查询资料 void search_salID():便于日后对销售员根据业绩进行考核。11)对销售数据进行排序void sort():有利于客户在选车时直观的了解汽车的销售资料。四详细设计1功能函数的调用关系图函数名函数原型功能返回值说明fcloseint fclose(FILE *fp)关闭fp所指的文件,释放文件缓冲区。有错则返回非0,否则返回0feofint feof(FILE *fp)检查档是否结束,遇文件结束符返回非零值,否则返回0。fopenFILE*open(char *filename,char mode)以mode指定的方式打开名为filename的檔成功,返回一个文件指针(文件信息区的起始地址),否则返回0。freadint fread(char *pt,unsignedsize,unsigned n,FILE *fp);从fp所指定的档中读取长度为size的n个数据项,存到pt所指定向的内存区返回所读的数据项个数,如遇文件结束或出错返回0fwriteint fwirte (char *ptr,unsigned size unsigned n,FILE *fp);把ptr所指向的n *size个字节输出到fp所指向的檔中写到fp文件中的数据项的个数getcharint getchar(void);从标准输入设备读取下一个字符。读字符。若文件结束或出错,则返回-1printfint printf(char *format,args,)按format指向的格式字符串规定的格式,将输出表列args的值输出到标准输出设备。输出字符的个数。若出错,返回负数Format字符串,或字符数组起始地址scanfint scanf (char *format,args,);从标准的输入设备按format指向的格式字符串所规定的格式,输入数据给args所指向的单元读入并赋给args的数据个数。遇文件结束返回EOF,出错返回0Args为指针strcmpint strcmp(char *str1,char *str2);比较两个字符串str1,str2str1<str2,返回负数;str1=str2,返回0;str1>str2,返回正数包含檔string.hstrcpychar *strcpy(char*str1,char *str2);把str2指向的字符串复制str1到去返回str1包含檔string.hstrlenunsigned int strlen(char *str);统计字符串中str中字符的个数(不包括终止符0)返回字符个数包含檔string.h2各功能函数的数据流程图;3重点设计及编码。五测试资料及运行结果1正常测试数据(3组)及运行结果;2非正常测试数据(2组)及运行结果。六调试情况,设计技巧及体会1对自己的设计进行评价,指出合理和不足之处,提出改进方案;2对设计及调试过程的心得体会。七参考文献八附录:源代码#include<stdio.h> #include<string.h> #include<conio.h> struct salman char ID15; char name15; sal20; struct car char ID15; int price; car20; struct salesdata int year; int month; int day; int soldnum; struct car car; struct salman salman; struct car all;sada20;void welcome() printf("tt#n");printf("tt # 1-Input the data #n");printf("tt # 2-Edit data #n");printf("tt # 3-Browse the data #n");printf("tt # 4-Calculat #n");printf("tt # 5-Sort #n");printf("tt # 6-Search #n");printf("tt # 7-Exit the system #n");printf("tt#n");void save( ) FILE *fp; int i; char all15,x; printf("nDo you want to save the data?n"); printf("Please input: 'Y' or 'N'n"); x=getch(); printf("Your choice: %cn",x); if(x!='n'&&x!='N'&&x!='y'&&x!='Y') printf("Wrong!choose again!n"); x=getch(); printf("Your choice: %cn",x); if(x='n'|x='N') getch(); return; if(x='y'|x='Y') printf("please input the name of the file!n"); scanf("%s",all); if(fp=fopen(all,"wb")=NULL) printf("can not open filen"); return; else for(i=0;i<15;i+) fwrite(&sadai,sizeof(struct salman),1,fp); printf("*save succeed*n"); fclose(fp); return;void input() int m; void input1(); void input2(); void input3(); printf("which data do you want to input?n"); printf("1-personn"); printf("2-carn"); printf("3-datan"); printf("4-back to welcomen"); printf("Your choose:"); scanf("%d",&m); switch(m) case 1: input1(); break; case 2: input2(); break; case 3: input3(); break; case 4: welcome(); break; default : printf("Error!n"); void input1() FILE *fp1; int i,m; printf("How many persons do you want to input?n"); printf("The amount is:"); scanf("%d",&m); for(i=0;i<m;i+) printf("The basic data of person %d:n",i+1); printf("Number is :"); scanf("%s",sali.ID); printf("name:"); scanf("%s",sali.name); fp1=fopen("input1","wb"); for(i=0;i<m;i+) if(fwrite(&sali,sizeof(struct salman),1,fp1)!=1) printf("file write errorn"); fclose(fp1); fp1=fopen("input1","rb"); printf("nCheck the data:n"); for(i=0;i<m;i+) fread(&sali,sizeof(struct salman),1,fp1); printf("%s %s n",sali.ID,sali.name); fclose(fp1); getch(); input(); void input2() FILE *fp2; int i,m; printf("How many cars do you want to input?n"); printf("The amount is:"); scanf("%d",&m); for(i=0;i<m;i+) printf("The basic data of car %d:n",i+1); printf("The car number is :"); scanf("%s",cari.ID); printf("price:"); scanf("%d",&cari.price); fp2=fopen("input2","wb"); for(i=0;i<m;i+) if(fwrite(&cari,sizeof(struct salman),1,fp2)!=1) printf("file write errorn"); fclose(fp2); fp2=fopen("input2","rb"); printf("nCheck the data:n"); for(i=0;i<m;i+) fread(&cari,sizeof(struct salman),1,fp2); printf("%s %dn",cari.ID,cari.price); fclose(fp2); getch(); input();int input3_1(int i) printf("Please input the data:"); printf("nThe data %d:n",i+1); printf("The sales number is :"); scanf("%s",sadai.salman.ID); printf("The car number is :"); scanf("%s",sadai.car.ID); printf("The car's price is :"); scanf("%d",&sadai.car.price); printf("soldnum:"); scanf("%d",&sadai.soldnum); printf("day:"); scanf("%d-%d-%d",&sadai.year,&sadai.month,&sadai.day); return; void input3() FILE *fp3; int i,m=0; char x; for(i=0;i<20;i+) if(strlen(sadai.salman.ID)!=0) m+; for(i=m;i<20-1;i+) input3_1(i); printf("Do you want to continue inputing new data?n"); printf("Please input: 'Y' or 'N'n"); x=getch();printf("Your choice:%c.n",x); if(x!='n'&&x!='N'&&x!='y'&&x!='Y') printf("Wrong!choose again!n"); x=getch(); printf("Your choice:%c.n",x); if(x='y'|x='Y') continue; if(x='n'|x='N') break; fp3=fopen("input3","wb"); for(m=0;m<i+1;m+) if(fwrite(&sadam,sizeof(struct salesdata),1,fp3)!=1) printf("file write errorn"); fclose(fp3); fp3=fopen("input3","rb"); printf("nCheck the data:n"); for(m=0;m<i+1;m+) fread(&sadam,sizeof(struct salman),1,fp3); printf("%s %s %d %d %d-%d-%dn",sadam.salman.ID,sadam.car.ID,sadam.soldnum,sadam.car.price,sadam.year,sadam.month,sadam.day); fclose(fp3); getch(); input();void insert() int i,m=0; for(i=0;i<20;i+) if(strlen(sadai.salman.ID)!=0) m+; input3_1(m); save(); void Delete() char ID20; int i,j,b=0,m=0; for(i=0;i<20;i+) if(strlen(sadai.salman.ID)!=0) m+; printf("Enter the ID of the car which you want to delete!"); scanf("%s",ID); for(i=0;i<m;i+) if(strcmp(sadai.salman.ID,ID)=0) for(j=i;j<=m;j+) sadaj=sadaj+1; b=1; if(b=0) printf("Do not find out your data!n"); if(b=1) printf("Succeed!The data has been deleted!n"); save();void modify() int i,j,b=0,m=0; char ID20; struct saldata int year,month,day; int soldnum,unitprice; char ID120,ID220; sada120;for(i=0;i<20;i+) if(strlen(sadai.salman.ID)!=0) m+; printf("Enter the ID of the person:"); scanf("%s",ID);for(i=0;i<m;i+) if(strcmp(sadai.salman.ID,ID)=0) printf("Now,please input the new data:"); printf("nThe data %d:n",i+1); printf("The sales number is :"); scanf("%s",sada1i.ID1); printf("The car's number is :"); scanf("%s",sada1i.ID2); printf("The price is :"); scanf("%d",&sada1i.unitprice); printf("soldunmber:"); scanf("%d",&sada1i.soldnum); printf("day:"); scanf("%d-%d-%d",&sada1i.year,&sada1i.month,&sada1i.day); strcpy(sadai.salman.ID,sada1i.ID1); strcpy(sadai.car.ID,sada1i.ID2); sadai.soldnum=sada1i.soldnum; sadai.car.price=sada1i.unitprice; sadai.year=sada1i.year; sadai.month=sada1i.month; sadai.day=sada1i.day; b=1; if(b=0) printf("Do not find out your data!n"); if(b=1) printf("Succeed!The data has been modified!n"); save();void editor() int m; printf("Which operation do you want to do?n"); printf("1-deleten"); printf("2-modifyn"); printf("3-insertn"); printf("4-back to welcomen"); printf("nYour choose:"); scanf("%d",&m); switch(m) case 1: Delete(); break; case 2: modify(); break; case 3: insert(); break; case 4: welcome(); break; default : printf("Error!n"); void search_salID() int i,flag=0; char ID15; printf("Please enter the number of person:"); scanf("%s",ID); for(i=0;i<20;i+) if(strcmp(sadai.salman.ID,ID)=0) printf("The information of this number:n"); printf("sal_ID car_ID soldnum unitprice solddayn"); printf(" %s %s %d %d %d-%d-%dn",sadai.salman.ID,sadai.car.ID,sadai.soldnum,sadai.car.price,sadai.year,sadai.month,sadai.day); flag=1; if(flag=0) printf("The number is not exist !n"); save();void search_carID() char ID15; int i,flag=0; printf("Please enter the ID of car:"); scanf("%s",ID);for(i=0;i<20;i+) if(strcmp(sadai.car.ID,ID)=0) printf("The information of this number:n"); printf("car_ID sal_ID soldnum unitprice solddayn"); printf(" %s %s %d %d %d-%d-%dn",sadai.car.ID,sadai.salman.ID,sadai.soldnum,sadai.car.price,sadai.year,sadai.month,sadai.day); flag=1; if(flag=0) printf("The carID is not exist !n"); save();void search() int m; printf("What do you want to search?n"); printf("1-the ID of 'person' n 2-the ID of 'car'n"); scanf("%d",&m); if(m!=1&&m!=2) printf("wrong!enter again:"); scanf("%d",&m); if(m=1) search_salID(); if(m=2) search_carID(); void calculat() int p20,sum=0,i,m=0; for(i=0;i<20;i+) if(strlen(sadai.salman.ID)!=0) m+;for(i=0;i<m;i+) pi=sadai.soldnum*sadai.car.price; sum=sum+pi; printf("Sal_ID: %-7stcar_ID: %-7stSales: %-10dn", sadai.salman.ID,sadai.car.ID,pi); printf("Total Sales: %dn",sum); save();void sort() int i,j,t,s,m=0,b20,a20; char temp20; for(i=0;i<20;i+) if(strlen(sadai.salman.ID)!=0) m+;for(i=0;i<m;i+) bi=sadai.soldnum*sadai.car.price; ai=sadai.soldnum; strcpy(sadai.all.ID,sadai.car.ID); for(i=1;i<m;i+) for(j=0;j<m-i;j+) if(bj>bj+1) t=bj; bj=bj+1; bj+1=t; s=aj; aj=aj+1; aj+1=s; strcpy(temp,sadaj.all.ID); strcpy(sadaj.all.ID,sadaj+1.all.ID); strcpy(sadaj+1.all.ID,temp); for(i=0;i<m;i+)printf("car_ID: %-5stsoldnum: %-5dtsale: %-10dn",sadai.all.ID,ai,bi); save();void browse() FILE *fp1,*fp2; int i,m=0; for(i=0;i<20;i+) if(strlen(sadai.salman.ID)!=0) m+; printf("Disply all the data below:n"); printf("sal_ID car_ID soldnum unitprice solddayn");for(i=0;i<m;i+) printf(" %s %s %d %d %d-%d-%dn",sadai.car.ID,sadai.salman.ID,sadai.soldnum,sadai.car.price,sadai.year,sadai.month,sadai.day); printf("nThe data of person:n"); if(fp1=fopen("input1","rb")=NULL) printf("Can not open file.n"); getch(); else while(!feof(fp1) fread(&sali,sizeof(struct salman),1,fp1); printf("person's ID is :%sn",sali.ID); printf("person's name is :%sn",sali.name); i+; printf("nThe data of car:n"); if(fp2=fopen("input2","rb")=NULL) printf("Can not open file.n"); getch(); else while(!feof(fp2) fread(&cari,sizeof(struct salman),1,fp2); printf("car's ID is :%sn",cari.ID); printf("car's unitprice is :%dn",cari.price); i+; fclose(fp1); fclose(fp2); save();main() int menu; while(1) welcome(); printf("n"); printf("Please select 1-7=:"); scanf("%d",&menu); switch(menu) case 1: input(); break; case 2: editor(); break; case 3: browse(); break; case 4: calculat(); break; case 5: sort(); break; case 6: search(); break; case 7: exit(0); break; default : printf("Error!n");

    注意事项

    本文(汽车销售管理系统设计报告.doc)为本站会员(小小飞)主动上传,三一文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三一文库(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    经营许可证编号:宁ICP备18001539号-1

    三一文库
    收起
    展开