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

正文內容

java基于socket網絡編程的超市收銀管理系統(tǒng)(編輯修改稿)

2025-06-12 20:02 本頁面
 

【文章內容簡介】 eive。 (商品名稱 \t\t\t\t + 數(shù)量 \t\t + 單價 \t\t + 金額 )。 .println()。 for (Cash cash : ()) { (() + () + \t\t + () + \t\t 17 + () + \t\t + ())。 } .println()。 } else { (修改數(shù)量有誤! )。 break。 } break。 } } else { (沒有掃描此商品。 )。 continue。 } } else { (對不起 ,沒有此商品,掃描失??! )。 break。 } } } else { (您還沒有掃描商品! )。 } } @SuppressWarnings(unchecked) public static void checkout() throws Exception {// 結賬 double money = 0。 MapString, String map = new HashMapString, String()。 if (count != 0) { (send, 結賬 )。 send(map)。 MapString, Cash map1 = (MapString, Cash) receive。 for (Cash cash : ()) { money += ()。 } (總金額是: + money)。 ( \ )。 int i = ()。 switch (i) { case 1:// 普通結賬 (請輸入您要支付的金額: )。 while (true) { 18 String money1 = ()。 if (money(money1) == true) { double m = (money1)。 if (m = money) { (\t\t\t 青鳥超市 )。 (收銀員號: + username + \t\t)。 Date date = new Date()。 SimpleDateFormat sdf = new SimpleDateFormat( yyyyMMddmmss)。 (小票號: + (date))。 (序 \t\t + 商品名稱 \t\t\t\t + 數(shù)量 \t\t + 單價 \t\t + 金額 )。 int n = 1。// 序號 int a = 0。// 總數(shù)量 MapString, Cash map2 = (MapString, Cash) receive。 .println( )。 for (Cash cash : ()) { (n + \t\t + () + () + \t\t + () + \t\t + () + \t\t + ())。 n++。 a += ()。 } .println()。 (總數(shù)量: + a + \t 應收: + money)。 (實收: + m + \t 找零 : + (m money))。 SimpleDateFormat sdf1 = new SimpleDateFormat( yyyy/MM/dd HH:mm:ss)。 ((date))。 (此小票是您退換貨及核對積分的憑證,請妥善保存! )。 .println(======================================================================)。 (send, 普通 )。 send(map)。 19 break。 } else { (請輸入正確的金額! )。 } } } break。 case 2:// 會員結賬 while (true) { (請輸入您的會員卡號: )。 String vipid = ()。 (send, 會員登錄 )。 (會員賬號 , vipid)。 send(map)。 if (會員存在 .equals(receive)) { (會員卡號正確,請輸入您要支付的金額:)。 String money1 = ()。 if (money(money1) == true) { double m = (money1)。 if (m = money) { (\t\t\t\t\t 青鳥超市 )。 (收銀員號: + username + \t\t\t\t)。 Date date = new Date()。 SimpleDateFormat sdf = new SimpleDateFormat( yyyyMMddHHmmss)。 (小票號: + (date))。 (序 \t\t + 商品名稱 \t\t\t\t + 數(shù)量 \t\t + 單價 \t\t + 金額 )。 int n = 1。// 序號 int a = 0。// 總數(shù)量 (send, 結賬 )。 send(map)。 MapString, Cash map3 = (MapString, Cash) receive。 .println()。 for (Cash cash : ()) { (n + \t\t 20 + () + () + \t\t + () + \t\t + () + \t\t + ())。 n++。 a += ()。 } .println()。 (總數(shù)量: + a + \t\t 應收: + money)。 (實收: + m + \t\t 找零 + (m money))。 (本次累計積分成功 \t 卡號 + vipid)。 int t = (int) money。// 對本次消費金額取整,得到消費積分 String score = (t)。 (send, 會員 )。 (消費積分 , score)。 send(map)。 String s = (String) receive。 int r = (s)。 (消費前積分 + 本 次消費積分 = 消費后積分 )。 (s + + + t + = + (r + t))。 SimpleDateFormat sdf1 = new SimpleDateFormat( yyyy/MM/dd HH:mm:ss)。 ((date))。 (此小票是您退換貨及核對積分的憑證,請 妥善保存! )。 .println(======================================================================)。 break。 } else { (請輸入正確的金額! )。 } } } else { (會員卡號錯 誤! )。 continue。 21 } } break。 default: (輸入錯誤! )。 break。 } } else { (您還沒有掃描商品! )。 } } private static boolean num(String str) {// 判斷輸入數(shù)量是否合理 try { (str)。 return true。 } catch (NumberFormatException e) { (商品數(shù)量: \ + str + \格式錯誤 )。 return false。 } } private static boolean price(String str) {// 判斷輸入價格是否合理 try { (str)。 return true。 } catch (NumberFormatException e) { (商品價格: \ + str + \格式錯誤 )。 return false。 } } private static boolean money(String str) {// 判斷結賬輸入金額是否合理 try { (str)。 return true。 } catch (NumberFormatException e) { (請輸入正確格式金額! )。 return false。 } } } 22 package socket。 /** * 線程類 * */ import 。 import 。 import 。 import 。 import 。 import 。 import 。 public class MyThread extends Thread { private Socket socket。// 監(jiān)聽套接字 public MyThread(Socket socket) { = socket。 } @SuppressWarnings({ rawtypes, unchecked }) public void run() { // 處理流中的所有信息 InputStream is = null。 ObjectInputStream ois = null。 OutputStream os = null。 ObjectOutputStream oos = null。 try { is = ()。 ois = new ObjectInputStream(is)。 // 獲得 map 對象 Map map = (Map) ()。 String st = (String) (send)。 Object send = null。 if (登錄 .equals(st)) { // 執(zhí)行登陸 send = (map)。 } else if (查詢編號 .equals(st)) { // 執(zhí)行查詢編號 send = (map)。 } else if (入庫 .equals(st)) { 23
點擊復制文檔內容
高考資料相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1