版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、【精品文檔】如有侵權(quán),請(qǐng)聯(lián)系網(wǎng)站刪除,僅供學(xué)習(xí)與交流java購(gòu)物系統(tǒng)源代碼.精品文檔.1 StartSMS.javapackage cn.itcast;import java.util.Scanner; * 系統(tǒng)開(kāi)啟類 * author Administratorpublic class StartSMS public StartSMS() public static void main(String args) Data data = new Data();data.ini();Menu menu = new Menu();menu.setData(data.goodsName, data.
2、goodsPrice, data.custNo,data.custBirth, data.custScore);menu.showLoginMenu();boolean flag = true;label0: do if (!flag)break;Scanner scanner = new Scanner(System.in);int i = scanner.nextInt();VerifyEqual verifyequal = new VerifyEqual();switch (i) case 1: / 001int j = 3;do if (j 客戶信息管理 添加客戶信息nn);Scann
3、er scanner = new Scanner(System.in);System.out.print(請(qǐng)輸入會(huì)員號(hào)():);int i = scanner.nextInt();System.out.print(請(qǐng)輸入會(huì)員生日(月/日):);String s = scanner.next();System.out.print(請(qǐng)輸入積分:);int j = scanner.nextInt();int k = -1;int l = 0;do if (l = custNo.length)break;if (custNol = 0) k = l;break;l+; while (true);cus
4、tNok = i;custBirthk = s;custScorek = j;System.out.println(新會(huì)員添加成功!);returnLastMenu();public void modify() System.out.println(購(gòu)物管理系統(tǒng) 客戶信息管理 修改客戶信息nn);System.out.print(請(qǐng)輸入會(huì)員號(hào):);Scanner scanner = new Scanner(System.in);int i = scanner.nextInt();System.out.println( 會(huì)員號(hào) 生日 積分 );System.out.println(-|-|-);
5、int j = -1;int k = 0;do if (k = custNo.length)break;if (custNok = i) System.out.println(new StringBuilder().append(custNok).append(tt).append(custBirthk).append(tt).append(custScorek).toString();j = k;break;k+; while (true);if (j != -1) System.out.println(* * * * * * * * * * * * * * * * * * * * * *
6、* * * * * * * * * * * * * * * * * *n);System.out.println(tttt1.修 改 會(huì) 員 生 日.n);System.out.println(tttt2.修 改 會(huì) 員 積 分.n);System.out.println(* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *n);System.out.print(請(qǐng)選擇,輸入數(shù)字:);switch (scanner.nextInt() case 1: / 001System.out.pri
7、nt(請(qǐng)輸入修改后的生日:);custBirthj = scanner.next();System.out.println(生日信息已更改!);break;case 2: / 002System.out.print(請(qǐng)輸入修改后的會(huì)員積分:);custScorej = scanner.nextInt();System.out.println(會(huì)員積分已更改!);break; else System.out.println(抱歉,沒(méi)有你查詢的會(huì)員。);returnLastMenu();public void search() System.out.println(購(gòu)物管理系統(tǒng) 客戶信息管理 查詢
8、客戶信息n);String s = y;Scanner scanner = new Scanner(System.in);for (; s.equals(y); s = scanner.next() System.out.print(請(qǐng)輸入會(huì)員號(hào):);int i = scanner.nextInt();System.out.println( 會(huì)員號(hào) 生日 積分 );System.out.println(-|-|-);boolean flag = false;int j = 0;do if (j = custNo.length)break;if (custNoj = i) System.out.
9、println(new StringBuilder().append(custNoj).append(tt).append(custBirthj).append(tt).append(custScorej).toString();flag = true;break;j+; while (true);if (!flag)System.out.println(抱歉,沒(méi)有你查詢的會(huì)員信息。);System.out.print(n要繼續(xù)查詢嗎(y/n):);returnLastMenu();public void show() System.out.println(購(gòu)物管理系統(tǒng) 客戶信息管理 顯示客戶
10、信息nn);System.out.println( 會(huì)員號(hào) 生日 積分 );System.out.println(-|-|-);int i = custNo.length;for (int j = 0; j 生日問(wèn)候nn);System.out.print(請(qǐng)輸入今天的日期(月/日):);Scanner scanner = new Scanner(System.in);String s = scanner.next();System.out.println(s);String s1 = ;boolean flag = false;for (int i = 0; i 幸運(yùn)抽獎(jiǎng)nn);System
11、.out.print(是否開(kāi)始(y/n):);Scanner scanner = new Scanner(System.in);if (scanner.next().equals(y) int i = (int) (Math.random() * 10D);boolean flag = false;String s = ;for (int k = 0; k 幸運(yùn)大放送nn);int i = 0;int j = custScore0;for (int k = 0; k j) j = custScorek;i = k;System.out.println(new StringBuilder().a
12、ppend(具有最高積分的會(huì)員是: ).append(custNoi).append(t).append(custBirthi).append(t).append(custScorei).toString();Gift gift = new Gift(); = 蘋果筆記本電腦;gift.price = 12000D;System.out.print(恭喜!獲贈(zèng)禮品: );System.out.println(gift);returnLastMenu();public String goodsName;public double goodsPrice;public int cu
13、stNo;public String custBirth;public int custScore;7 Manager.javapackage cn.itcast; * 管理員類 * author Administratorpublic class Manager public Manager() username = itcast;password = itcast;public String username;public String password;8 Menu.javapackage cn.itcast;import java.util.Scanner; * 頁(yè)面類 * autho
14、r Administratorpublic class Menu public Menu() public void setData(String as, double ad, int ai, String as1,int ai1) goodsName = as;goodsPrice = ad;custNo = ai;custBirth = as1;custScore = ai1;public void showLoginMenu() System.out.println(nnttt 歡迎使用itcast購(gòu)物管理系統(tǒng)1.0版nn);System.out.println(* * * * * *
15、* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *n);System.out.println(tttt 1. 登 錄 系 統(tǒng)nn);System.out.println(tttt 2. 更 改 管 理 員 密 碼nn);System.out.println(tttt 3. 退 出nn);System.out.println(* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *n);System.out.pr
16、int(請(qǐng)選擇,輸入數(shù)字:);public void showMainMenu() System.out.println(nntttt歡迎使用購(gòu)物管理系統(tǒng)n);System.out.println(* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *n);System.out.println(tttt 1. 客 戶 信 息 管 理n);System.out.println(tttt 2. 購(gòu) 物 結(jié) 算n);System.out.println(tttt 3. 真 情 回 饋n);Syst
17、em.out.println(tttt 4. 注 銷n);System.out.println(* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *n);System.out.print(請(qǐng)選擇,輸入數(shù)字:);Scanner scanner = new Scanner(System.in);boolean flag = false;do String s = scanner.next();if (s.equals(1) showCustMMenu();break;if (s.equals(
18、2) Pay pay = new Pay();pay.setData(goodsName, goodsPrice, custNo, custBirth,custScore);pay.calcPrice();break;if (s.equals(3) showSendGMenu();break;if (s.equals(4) showLoginMenu();break;System.out.print(輸入錯(cuò)誤,請(qǐng)重新輸入數(shù)字:);flag = false; while (!flag);public void showCustMMenu() System.out.println(購(gòu)物管理系統(tǒng) 客
19、戶信息管理n);System.out.println(* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *n);System.out.println(tttt 1. 顯 示 所 有 客 戶 信 息n);System.out.println(tttt 2. 添 加 客 戶 信 息n);System.out.println(tttt 3. 修 改 客 戶 信 息n);System.out.println(tttt 4. 查 詢 客 戶 信 息n);System.out.println(* *
20、* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *n);System.out.print(請(qǐng)選擇,輸入數(shù)字或按n返回上一級(jí)菜單:);Scanner scanner = new Scanner(System.in);boolean flag = true;do CustManagement custmanagement = new CustManagement();custmanagement.setData(goodsName, goodsPrice, custNo, custBirth,cus
21、tScore);String s = scanner.next();if (s.equals(1) custmanagement.show();break;if (s.equals(2) custmanagement.add();break;if (s.equals(3) custmanagement.modify();break;if (s.equals(4) custmanagement.search();break;if (s.equals(n) showMainMenu();break;System.out.println(輸入錯(cuò)誤, 請(qǐng)重新輸入數(shù)字:);flag = false; w
22、hile (!flag);public void showSendGMenu() System.out.println(購(gòu)物管理系統(tǒng) 真情回饋n);System.out.println(* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *n);System.out.println(tttt 1. 幸 運(yùn) 大 放 送n);System.out.println(tttt 2. 幸 運(yùn) 抽 獎(jiǎng)n);System.out.println(tttt 3. 生 日 問(wèn) 候n);System.out.p
23、rintln(* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *n);System.out.print(請(qǐng)選擇,輸入數(shù)字或按n返回上一級(jí)菜單:);Scanner scanner = new Scanner(System.in);boolean flag = true;GiftManagement giftmanagement = new GiftManagement();giftmanagement.setData(goodsName, goodsPrice, custNo, custB
24、irth,custScore);do String s = scanner.next();if (s.equals(1) giftmanagement.sendGoldenCust();break;if (s.equals(2) giftmanagement.sendLuckyCust();break;if (s.equals(3) giftmanagement.sendBirthCust();break;if (s.equals(n) showMainMenu();break;System.out.println(輸入錯(cuò)誤, 請(qǐng)重新輸入數(shù)字:);flag = false; while (!f
25、lag);public String goodsName;public double goodsPrice;public int custNo;public String custBirth;public int custScore;9 Pay.javapackage cn.itcast;import java.util.Scanner; * 購(gòu)物付款 * author Administratorpublic class Pay public Pay() public void setData(String as, double ad, int ai, String as1,int ai1) goodsName = as;goodsPrice = ad;custNo = ai;custBirth = as1;custScore = ai1;public double getDiscount(int i, int ai, int ai1) int j = -1;int k = 0;do if (k = ai.length)break;if (i = aik) j = k;break;k+; wh
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二五年度民政局離婚協(xié)議書模板版權(quán)授權(quán)協(xié)議4篇
- 2025年度抹灰工程施工材料采購(gòu)合同范本4篇
- 2025年度農(nóng)場(chǎng)農(nóng)業(yè)產(chǎn)業(yè)鏈金融服務(wù)合同-@-1
- 二零二五年度高標(biāo)準(zhǔn)大棚建設(shè)與農(nóng)產(chǎn)品加工合作合同2篇
- 2025洗車場(chǎng)洗車液及添加劑供應(yīng)合同集錦2篇
- 2025年度個(gè)人果園生態(tài)旅游開(kāi)發(fā)合作合同書3篇
- 2025年度個(gè)人購(gòu)房合同房屋驗(yàn)收標(biāo)準(zhǔn)4篇
- 課題申報(bào)參考:面向ESG的“綠天鵝”風(fēng)險(xiǎn)對(duì)中國(guó)保險(xiǎn)行業(yè)韌性的沖擊與影響研究
- 2025版企業(yè)信息化建設(shè)培訓(xùn)聘用技術(shù)專家合同4篇
- 2025年度個(gè)人委托代繳社保增值服務(wù)合同范本3篇
- 2024公路瀝青路面結(jié)構(gòu)內(nèi)部狀況三維探地雷達(dá)快速檢測(cè)規(guī)程
- 2024年高考真題-地理(河北卷) 含答案
- 中國(guó)高血壓防治指南(2024年修訂版)解讀課件
- 2024年浙江省中考科學(xué)試卷
- 2024風(fēng)力發(fā)電葉片維保作業(yè)技術(shù)規(guī)范
- 《思想道德與法治》課程教學(xué)大綱
- 2024光儲(chǔ)充一體化系統(tǒng)解決方案
- 2024年全國(guó)高考新課標(biāo)卷物理真題(含答案)
- 處理后事授權(quán)委托書
- 食材配送服務(wù)方案投標(biāo)方案(技術(shù)方案)
- 足療店?duì)I銷策劃方案
評(píng)論
0/150
提交評(píng)論