freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

商品銷售統(tǒng)計(jì)--c課程設(shè)計(jì)-wenkub

2023-07-22 17:50:51 本頁(yè)面
 

【正文】 endl。 string name。 exit(0)。 coutendl。 } void Message_modify(GOODS goods2[],int size) //底層函數(shù) :修改商品信息函數(shù)(從屬亍商品信息管理系統(tǒng)) { if(goods2[0].name==0) { coutCaution:當(dāng)前無(wú)商品信息,請(qǐng)返回更新?。?y/n) __。 else if(l==y||l==Y){}。 22 cout__繼續(xù)錄入商品信息?( y/n) __。 cout請(qǐng)輸入第 j+1種商品的數(shù)量: __。 coutendl。 cingoods1[j].name。 } for(j=m。 for(i=0。 } 21 void input_gds_mesg(GOODS goods1[],int size) //底層 函數(shù):錄入商品信息函數(shù) (從屬亍商品信息管理系統(tǒng) ) { int i,j,m=0。 GOODS::GOODS() { name=0。 //底層函數(shù):刪除商品信息(從屬亍商品信息管理系統(tǒng)) friend void Goods_Message_Manage(GOODS Goods1[],int size)。 //構(gòu)造函數(shù) //排序函數(shù),使得信息為空的商品類數(shù)組元素沉底,丌為空的排在前面(被 刪除商品信息函數(shù) 調(diào)用) friend void sort(GOODS array[],int size)。 //商品名 string unit。其中,每個(gè)子系統(tǒng)又可根據(jù) switch 語(yǔ)句進(jìn)行選擇操作,并能實(shí)現(xiàn)在兩個(gè)子系統(tǒng)之間的切換。第二部分運(yùn)行時(shí),首先顯示所有商品名稱 及代碼(商品數(shù)目較多時(shí),應(yīng)考慮分屏顯示),用戶輸入商品代碼及商品重量或件數(shù),用戶一次操作可輸入若干商品的購(gòu)買(mǎi)信息,然后輸入一個(gè)特殊的代碼(如“ 1”)表示本次購(gòu)物結(jié)束。所有商品的信息事先已存入計(jì)算機(jī),屏幕上顯示所有商品的名稱,選擇商品名,輸入商品計(jì)量單位(如重量、件數(shù)等),根據(jù)單價(jià)算出總價(jià)??蛻粢淮慰赡苜?gòu)買(mǎi)多種商品,程序應(yīng)計(jì)算出客戶應(yīng)付的錢(qián)款數(shù)。此時(shí),程序計(jì)算出應(yīng)付錢(qián)款數(shù)并顯示。 19 圖示 類名 類別 類型 名稱 說(shuō)明private string name 商品名private string unit 計(jì)量單位private double price_per_unit 單價(jià)private double amount 商品總數(shù)public GOODS () 構(gòu)造函數(shù)GOODSfriend viod sort() 排序 , 使得信息為空的商品沉底friend viod input_gds_mesg() 底層函數(shù) : 錄入商品信息friend viod Message_modify() 底層函數(shù) : 修改商品信息friend viod Message_delete() 底層函數(shù) : 刪除商品信息friend viod Goods_Message_Manage() 中層函數(shù) : 1. 商品信息管理系統(tǒng)friend viod Goods_Sale() 中層函數(shù) : 2. 商品銷售系統(tǒng)friend viod WORK() 高層函數(shù) : 商品銷售統(tǒng)計(jì)工程 根據(jù)提示選擇操作即可,具體為: ( 1) 程序運(yùn)行時(shí),首先要求初始化商品信息,即需添加銷售的商品名稱、單價(jià)等; ( 2) 根據(jù)需求選擇進(jìn)入商品信息管理系統(tǒng)或者商品銷售系統(tǒng),其中前者可進(jìn)行的操作有:錄入新商品信息、修改商品信息、刪除商品信息等,后者為用 戶提供購(gòu)買(mǎi)商品功能,只需根據(jù)提示操作即可; 注意:請(qǐng)輸入不程序要求相應(yīng)的選擇以及正確的格式,丌要超出程序給定的范圍! 源代碼 includeiostream includestring includefstream using namespace std。 //計(jì)量單位 double price_per_unit。 friend void input_gds_mesg(GOODS goods1[],int size)。 //中層函數(shù): (從屬亍商品銷售統(tǒng)計(jì)工程) friend void Goods_Sale(GOODS Goods2[],int size)。 unit=0。 int s=size。is。jn。 coutendl。 cout請(qǐng)輸入第 j+1種商品的單價(jià)(元): __。 cingoods1[j].amount。 cinl。 } cout__商品信息錄入完成! endlendl。 string c。 if(c==y||c==Y) { Goods_Message_Manage(goods2,size)。 } } string p,q。 double price。 cout\t 商品編號(hào) \t 商品名稱 \t 商品單價(jià) \t 商品余量endlendl。is。im。 // int n。 cout__ 您 想 修 改 信 息 的 商 品 為 :n.goods2[n1].name( y/n) __。 if(p==y||p==Y) { cout ________________________________________________________________________ endl。 cout endlendl。 coutendl。 goods2[n1].name=name。 cinunit。 // !! double price。 case 4: cout 請(qǐng)輸入 n 號(hào) 商品goods2[n1].name的數(shù)量: __。 break。amp。amp。 cout__繼續(xù)修改商品信息( y/n)? __。 }while(q==y||q==Y)。 } void sort(GOODS array[],int size) //排序函數(shù),使得信息為空的商品類數(shù)組元素沉底,丌為空的排在前面(被 刪除商品信息函數(shù) 調(diào)用) { int i,j。i++) { for(j=0。array[j+1].name!=0) { temp=array[j]。 } void Message_delete(GOODS goods3[],int size) //底層函數(shù):刪除商品信息函數(shù)(從屬亍商品信息管理系統(tǒng)) { if(goods3[0].name==0) { coutCaution:對(duì)丌起,當(dāng)前無(wú)商品信息,請(qǐng)返回更新!( y/n) __。 coutendl。 exit(0)。 //double price。 int s=size。 else if(goods3[i].name==0)s=m。 } cout ________________________________________________________________________ endl。 coutendl。 coutendl。 goods3[n1].amount=0。 // string q。 cout__ 商 品 信 息 刪 除 完 成 ! 。 } void Goods_Message_Manage(GOODS Goods1[],int size) //中層函數(shù): M.商品信息管理系統(tǒng)(從屬亍商品銷售統(tǒng)計(jì)工程) 30 { int choice1。 cout ★ ★ endl。 cout 2. 修改 商品 信 息 endl。 cout _____________________________________________________________ endl。 switch(choice1) 31 { case 1: input_gds_mesg(Goods1,size)。 case 3: Message_delete(Goods1,size)。 case 0: cout 謝謝使用,祝您愉快!再見(jiàn)! endl。 break。amp。amp。 string c。 if(c==y||c==Y) { Goods_Message_Manage(Goods2,size)。 } } string p,q。 double money=。 int i,m=0。i++) { if(Goods2[i].name!=0)m++。i++) { cout\ti+1\t\tGoods2[i].name\tGoods2[i].price_per_unit 元/Goods2[i].unit\tGoods2[i].amountGoods2[i].unitendlendl。 for(j=0。 } // do 34 // { // cinnum[j]。 cout ________________________________________________________________________ endl。f++) { if(num[f]!=0) { coutnum[f]\t\tGoods2[num[f]1].nameendlendl。 cinp。 cout ________________________________________________________________________ endl。amp。 Goods2[num[f]1].amount=amount[r]。 cout__您購(gòu)買(mǎi)的商品信息如下 :endlendl。(fj1)amp。 } 36 } cout ________________________________________________________________________ endl。(rsize)。 cout__繼續(xù)購(gòu)物( y/n)? __。 }while(q==y||q==Y)。 cout 1. 商品信 息管理系統(tǒng) 37 endl。 cout 請(qǐng)輸入您的選擇:( 02) __。 break。 exit(0)。 } }while(choice!=0)。 cout ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ endl。 cout ★☆ ☆★ endl。 cout ★☆ ☆★ endl。 cout W E L C O M E endl。 } 40 41 42 43
點(diǎn)擊復(fù)制文檔內(nèi)容
研究報(bào)告相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1