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

正文內(nèi)容

基于jsp的小型超市信息管理系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)(參考版)

2025-06-29 21:48本頁面
  

【正文】 雖然可以通過操作者的人為控制避免這些失誤,但系統(tǒng)的穩(wěn)定性,代碼強(qiáng)度都受到了影響。數(shù)據(jù)庫沒有用到連接池技術(shù),難以滿足段時(shí)間內(nèi)大量的訪問鏈接以及對數(shù)據(jù)庫的操作,亟待改善。小型超市信息管理系統(tǒng)的界面友好度還有待提升,用戶體驗(yàn)尚需完善??偨Y(jié)前面的各項(xiàng)設(shè)計(jì)與分析成果,我們可以得到以下結(jié)論:小型超市的基本功能已經(jīng)實(shí)現(xiàn),可以滿足正常經(jīng)營的需要。普通顧客測試用例見表52所示。管理員登錄測試如表 51所示。本次測試從兩方面進(jìn)行。白盒測試法(又稱結(jié)構(gòu)測試),是把程序看做裝在一個(gè)透明的白盒子里,也就是在完全了解程序結(jié)構(gòu)和代碼的前提下,按照程序內(nèi)部的邏輯測試程序,檢驗(yàn)程序中的每條通路是否都能按照預(yù)定要求正確工作。黑盒測試法(又稱功能測試),是把系統(tǒng)看成一個(gè)黑盒子,完全不考慮程序內(nèi)部結(jié)構(gòu)和代碼,是在程序接口進(jìn)行的測試。系統(tǒng)測試是將已經(jīng)確認(rèn)的軟件,完成的代碼,計(jì)算機(jī)硬件,網(wǎng)絡(luò)等其他元素結(jié)合在一起,進(jìn)行系統(tǒng)的各種組裝測試和確認(rèn)測試。createInput方法從前臺接受數(shù)據(jù),并調(diào)用GoodsDAO的checkExist方法,按照商品名對數(shù)據(jù)庫進(jìn)行查找。 }說明:進(jìn)貨單模塊是超市信息管理系統(tǒng)中很重要的一個(gè)組成部分。(request, response)。} (id,name, goodstype, price, purchaseprice, amount, gettime, maintaintime, factory)。 }else{(name, goodstype, price, purchaseprice, amount, gettime, maintaintime, factory)。int id=(name)。Int maintaintime=((GoodsMaintainTime))。int amount=((GoodsAmount))。(price)。int goodstype=((GoodsType))。GoodsDAO gooddao=new GoodsDAO()。}}} public void createInput(HttpServletRequest request, HttpServletResponse response){try{ ToChinese to=new ToChinese()。}}public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {int flag=((flag))。()。}catch(Exception e){()。RequestDispatcher rd=()。}}} public void selectAll(HttpServletRequest request, HttpServletResponse response){try{ListInputlist=()。deleteByID(id,request,response)。break。}public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {int flag=((flag))。public class InputController extends HttpServlet {private InputDAO inputdao=new InputDAO()。import 。import 。import 。import 。import 。}}進(jìn)貨單控制類():package controller。}public String getInput_Factory() {return Input_Factory。}public int getInput_MaintainTime() {return Input_MaintainTime。}public String getInput_GetTime() {return Input_GetTime。}public int getInput_Amount() {return Input_Amount。}public int getInput_PurchasePrice() {return Input_PurchasePrice。}public int getInput_Price() {return Input_Price。}public int getInput_Type() {return Input_Type。}public String getInput_Name() {return Input_Name。}public int getInput_GoodsID() {return Input_GoodsID。}public int getInputID() {return InputID。Input_MaintainTime = input_MaintainTime。Input_Amount = input_Amount。Input_Price = input_Price。Input_Name = input_Name。InputID = inputID。public Input() {super()。private int Input_MaintainTime。private int Input_Amount。private int Input_Price。private String Input_Name。public class Input {private int InputID。return Accountcode。public class CodeCreator {public CodeCreator(){}public String createAccountcode(){SimpleDateFormat sdf=new SimpleDateFormat(yyyyMMddHHmmss)。import 。}return。return str。public class ToChinese {public ToChinese(){}public static String tochinese(String str){try{if(str==null){return。}return con。con=(url)。characterEncoding=UTF8。password=+psw+amp。private static String psw=123456。數(shù)據(jù)庫連接類():public class DBConnector {private Connection con。缺少了功能性模塊的支持,實(shí)現(xiàn)業(yè)務(wù)邏輯就無從談起。}}相關(guān)頁面設(shè)計(jì)見圖512,圖513,圖514。(request, response)。}}().setAttribute(ShoppingCart, list)。i()。 ()方法:public void removecart(int id,HttpServletRequest request, HttpServletResponse response){try{ListShoppingcart list=(ListShoppingcart)().getAttribute(ShoppingCart)。如果發(fā)現(xiàn)消費(fèi)者購買的商品數(shù)量大于庫存時(shí),則不允許其購買,并在界面上輸出相應(yīng)錯(cuò)誤信息。}}說明:此方法用來修改購物車中商品的數(shù)量。(request, response)。}}().setAttribute(ShoppingCart, lsc)。(i).setAmount((num[i]))。}else{String error=商品數(shù)量不能大于余量。((i))。i()。ListShoppingcart lsc=new ArrayListShoppingcart()。 try{GoodsDAO gooddao=new GoodsDAO()。若是第一次購買此物品,則默認(rèn)商品數(shù)量初始值為1。如果購物車中已經(jīng)存在此商品,則將購物車中的商品數(shù)量信息單獨(dú)保存,并從購物車中刪除此商品的信息。}catch(Exception e){()。RequestDispatcher rd=()。(sc)。(exitNum+1)。(())。 } }Shoppingcart sc=new Shoppingcart()。i++){if((i).getID()==id){exitNum=(i).getAmount()。for(int i=0。int exitNum=0。圖511 購物車模塊流程圖()方法:public void add(int id,HttpServletRequest request, HttpServletResponse response){try{().setAttribute(Amounterror, )。結(jié)賬成功后,則對數(shù)據(jù)庫中的商品余量進(jìn)行修改,自動(dòng)減去顧客購買的商品數(shù)量。每點(diǎn)擊相關(guān)鏈接就調(diào)用servlet的對應(yīng)函數(shù)對session中的ShoppingCart進(jìn)行操作。添加商品至購物車時(shí),會對購物車中的商品進(jìn)行校驗(yàn),若商品已在購物車中,則不在購物車中添加新項(xiàng)目,而是只修改商品數(shù)量。 for(Shoppingcart sc :list){allcost+=()*()。% tr td%=() %/td td%=() %/td tdinput type=text value=%=()% name=num /td td%=()*() %/td tda href=?flag=3amp。i()。 % table tr td width=608% if(()==0){% 您未購買任何商品。代碼如下: body %ListShoppingcartlist=new ArrayListShoppingcart()。然后重新實(shí)例化一個(gè)Shoppingcart ,將顧客選中的商品信息存入list中重新存入session中。 } }說明:其中在session范圍內(nèi)設(shè)置了“AmountError”變量,用于校驗(yàn)購物車中商品數(shù)量與現(xiàn)在超市中商品余量的關(guān)系。 (request, response)。().setAttribute(ShoppingCart, list)。(())。 (())。Goods g=(id)。i++){if((i).getID()==id){exitNum=(i).getAmount(); ((i))。for(int i=0。int exitNum=0。系統(tǒng)根據(jù)XML配置文件,調(diào)用CartController 中的add方法,代碼如下:public void add(int id,HttpServletRequest request, HttpServletResponse response){try{ ().setAttribute(Amounterror, )。如果喜歡某件商品,點(diǎn)擊每行商品后的“添加至購物車”鏈接,調(diào)用“?flag=1amp。}相關(guān)頁面設(shè)計(jì)見圖58,59,510。 }catch(Exception e){()。(good)。((GoodsMaintainTime))。((GoodsAmount))。((GoodsPrice))。((GoodsName))。while(()){Goods
點(diǎn)擊復(fù)制文檔內(nèi)容
黨政相關(guān)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1