C++课程设计报告商品管理系统Word格式.docx

上传人:b****1 文档编号:839155 上传时间:2023-04-29 格式:DOCX 页数:66 大小:86.53KB
下载 相关 举报
C++课程设计报告商品管理系统Word格式.docx_第1页
第1页 / 共66页
C++课程设计报告商品管理系统Word格式.docx_第2页
第2页 / 共66页
C++课程设计报告商品管理系统Word格式.docx_第3页
第3页 / 共66页
C++课程设计报告商品管理系统Word格式.docx_第4页
第4页 / 共66页
C++课程设计报告商品管理系统Word格式.docx_第5页
第5页 / 共66页
C++课程设计报告商品管理系统Word格式.docx_第6页
第6页 / 共66页
C++课程设计报告商品管理系统Word格式.docx_第7页
第7页 / 共66页
C++课程设计报告商品管理系统Word格式.docx_第8页
第8页 / 共66页
C++课程设计报告商品管理系统Word格式.docx_第9页
第9页 / 共66页
C++课程设计报告商品管理系统Word格式.docx_第10页
第10页 / 共66页
C++课程设计报告商品管理系统Word格式.docx_第11页
第11页 / 共66页
C++课程设计报告商品管理系统Word格式.docx_第12页
第12页 / 共66页
C++课程设计报告商品管理系统Word格式.docx_第13页
第13页 / 共66页
C++课程设计报告商品管理系统Word格式.docx_第14页
第14页 / 共66页
C++课程设计报告商品管理系统Word格式.docx_第15页
第15页 / 共66页
C++课程设计报告商品管理系统Word格式.docx_第16页
第16页 / 共66页
C++课程设计报告商品管理系统Word格式.docx_第17页
第17页 / 共66页
C++课程设计报告商品管理系统Word格式.docx_第18页
第18页 / 共66页
C++课程设计报告商品管理系统Word格式.docx_第19页
第19页 / 共66页
C++课程设计报告商品管理系统Word格式.docx_第20页
第20页 / 共66页
亲,该文档总共66页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

C++课程设计报告商品管理系统Word格式.docx

《C++课程设计报告商品管理系统Word格式.docx》由会员分享,可在线阅读,更多相关《C++课程设计报告商品管理系统Word格式.docx(66页珍藏版)》请在冰点文库上搜索。

C++课程设计报告商品管理系统Word格式.docx

intcounter

voidgoods_getout()

voidgoods_getin()

voidgoods_shows()

voidgoods_in()

voidgoods_out()

voidprice_change()

voidcounter_change()

↗↖

Clothes

stringmaterial

intclo_get(Clothesa[])

intclo_show(Clothesa[])

intclo_pa(Clothesa[])

intclo_operate(Clothesa[])

Cap

stringstyle

intcap_get(Capa[])

intcap_show(Capa[])

intcap_pa(Capa[])

intcap_operate(Capa[])

Shoes

Pants

↑↑

Refrigerator

stringrefrigeration_form

stringcolor

intref_get(Refrigeratora[])

intref_show(Refrigeratora[])

intref_pa(Refrigeratora[])

intref_operate(Refrigeratora[])

TV

doubleweight

inttv_get(TVa[])

inttv_show(TVa[])

inttv_pa(TVa[])

inttv_operate(TVa[])

Closet

stringtimber

intcls_get(Closeta[])

intcls_show(Closeta[])

intcls_pa(Closeta[])

intcls_operate(Closeta[])

Sofa

stringcladding

intsofa_get(Sofaa[])

intsofa_show(Sofaa[])

intsofa_pa(Sofaa[])

intsofa_operater(Sofaa[])

WAC

属性和方法定义

类名

成员类别

类型

成员名

描述

属性

string

double

int

name

producing_area

size

price

sum

counter

商品名称

商品产地

商品尺寸

商品价格

商品总价

商品所属货柜

方法

void

goods_getout()

goods_getin()

goods_shows()

goods_in()

goods_out()

price_change()

counter_change()

提示输入商品信息

商品信息输入

商品信息输出

商品进库

商品出库

商品调价

商品货柜管理

material

商品布料

clo_get(Clothesa[])

clo_show(Clothesa[])

clo_pa(Clothesa[])

clo_operate(Clothesa[])

录入该类新商品

该类商品查询

该类商品产地查询

对该类商品的操作

style

布料

样式

cap_get(Capa[])

cap_show(Capa[])

cap_pa(Capa[])

cap_operate(Capa[])

refrigeration_form

color

weight

制冷类型

颜色

重量

ref_get(Refrigeratora[])

ref_show(Refrigeratora[])

ref_pa(Refrigeratora[])

ref_operate(Refrigeratora[])

sytle

tv_get(TVa[])

tv_show(TVa[])

tv_pa(TVa[])

tv_operater(TVa[])

timber

木料

cls_get(Closeta[])

cls_show(Closeta[])

cls_pa(Closeta[])

cls_operate(Closeta[])

cladding

皮料

sofa_get(Sofaa[])

sofa_show(Sofaa[])

sofa_pa(Sofaa[])

sofa_operate(Sofaa[])

(3)用户手册另见“泡泡商品管理系统用户手册”

(4)调试及测试:

现以衬衣类为例:

测试商品的录入、商品进库、查询商品信息、商品产地统计。

(因商品出库、商品调价、商品货柜管理与商品进库相似,所以仅演示一项)

现假设在衬衣类中已有四种商品分别为:

现运行如下:

(5)源程序:

#include<

iostream>

string>

iomanip>

usingnamespacestd;

inti=2;

//i用于界面转换

classGoods{

protected:

stringname,producing_area;

doublesize,price;

intsum,counter;

public:

voidgoods_getout();

voidgoods_getin();

voidgoods_shows();

//输出商品信息

voidgoods_in();

//商品进库

voidgoods_out();

//商品出库

voidprice_change();

//价格调整

voidcounter_change();

};

voidGoods:

:

goods_getout(){

cout<

<

"

尺寸"

\t"

<

单价"

产地"

库存量"

所属货柜"

;

}

goods_getin(){

cin>

>

size>

price>

producing_area>

sum>

counter;

goods_shows(){

size<

price<

producing_area<

sum<

counter<

goods_in(){

intb;

charc;

现有库存:

endl

请输入商品的新进库数:

b;

if(b>

=0){

cout<

确认商品新进库数为:

b<

(Y/N)"

cin>

c;

if(c=='

y'

||c=='

Y'

){

sum=sum+b;

cout<

该商品的新库存为:

endl;

}

else{

if(c=='

n'

N'

该商品库存未变,仍为:

}

else{

输入错误"

goods_out(){

请输入商品的出库数:

0){

if(b<

=sum){

确认商品出库数:

cin>

sum=sum-b;

cout<

}

else{

if(c=='

cout<

该商品库存不足!

输入错误!

price_change(){

doubleb;

商品的价格为:

请输入商品的新价格:

确认商品的新价格为:

price=b;

该商品的新价格为:

该商品价格未变,仍为:

商品价格输入错误!

counter_change(){

商品的货柜为:

请输入商品的新货柜:

确认商品的新货柜为:

if(c=='

counter=b;

该商品的新货柜为:

该商品货柜未变,仍为:

classClothes:

publicGoods{//衬衣类

stringmaterial;

intclo_get(Clothesa[]);

//商品录入

intclo_show(Clothesa[]);

//商品查询

intclo_pa(Clothesa[]);

//产地统计

intclo_operate(Clothesa[]);

//方法实现

intClothes:

clo_get(Clothesa[]){

intk,j;

while(i==1){

for(j=1;

a[j].name!

="

j++){}

名称"

<

材料"

a[j].goods_getout();

a[j].name>

a[j].material;

a[j].goods_getin();

for(k=0;

k<

j;

k++){

if(a[k].name!

=a[j].name&

&

k==j-1){

if(a[j].size<

=0||a[j].price<

0||a[j].sum<

商品信息输入错误!

a[j].name="

a[j].producing_area="

break;

}

endl<

您输入的商品信息为:

<

a[j].goods_getout();

a[j].name<

<

a[j].material<

a[j].goods_shows();

break;

if(a[k].name==a[j].name&

j){

该商品已存在!

a[j].name="

a[j].producing_area="

继续输入,请按1"

返回上一级,请按0."

i;

returni;

clo_show(Clothesa[]){

intk;

stringn;

doublez;

if(a[1].name=="

系统内暂无商品信息!

请输入要查询的商品名称、尺寸:

n>

z;

for(k=1;

a[k].name!

if(a[k].name==n&

a[k].size==z){

<

a[k].goods_getout();

总价"

a[k].name<

a[k].material<

a[k].goods_shows();

setw(10)<

a[k].sum*a[k].price<

else{

if(a[k+1].name=="

cout<

该商品不存在!

}

重新查询,请按1"

返回上一级,请按0"

clo_pa(Clothesa[]){

intk,j,b;

stringpa,n;

stringPA[1000],N[1000];

for(k=1;

PA[k]=a[k].producing_area;

N[k]=a[k].name;

j-1;

for(b=1;

j-k-1;

b++){

if(PA[k]>

PA[k+1]){

pa=PA[k];

PA[k]=PA[k+1];

PA[k+1]=pa;

n=N[k];

N[k]=N[k+1];

N[k+1]=n;

if(a[1].name!

PA[1]<

N[1]<

"

PA[k]!

if(PA[k]==PA[k+1]){

N[k+1]<

if(PA[k+1]!

<

PA[k+1]<

现返回上一级,请按0"

clo_operate(Clothesa[]){

intk,choice;

1.添加新商品"

2.商品进库"

3.商品出库"

4.商品价格调整"

5.商品货柜调整"

6.商品信息查询"

7.商品产地统计"

0.返回商品选择界面"

choice;

switch(choice){

case0:

i=2;

break;

case1:

clo_get(a);

case2:

case3:

case4:

case5:

while(i==1){

if(a[1].name=="

请输入商品的名称、尺寸:

cin>

for(k=1;

if(a[k].name==n&

if(choice==2){

a[k].goods_in();

}

if(choice==3){

a[k].goods_out();

if(choice==4){

a[k].price_change();

if(choice==5){

a[k].counter_change();

break;

else{

if(a[k+1].name=="

cout<

重新输入,请按1"

case6:

clo_show(a);

case7:

clo_pa(a);

classShoes:

publicClothes{};

//鞋类

classPants:

//裤子类

classCap:

publicGoods{//帽子类

private:

stringmaterial,style;

intcap_get(Capa[]);

intcap_show(Capa[]);

intcap_pa(Capa[]);

intcap_operate(Capa[]);

/

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

当前位置:首页 > 总结汇报 > 学习总结

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2