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

正文內(nèi)容

網(wǎng)上圖書銷售系統(tǒng)課程設(shè)計(jì)報(bào)告-閱讀頁

2025-04-07 12:06本頁面
  

【正文】 ight (c) 2022/p 信息工程系 計(jì)網(wǎng)班第 16 頁 共 50 頁 * pCompany:Ling Du book shop online /p*/import .*。 //定義一個 Connection 對象 public Statement stmt。 //定義一個 ResultSet 對象 public String sqlStr=。 } public boolean connect(){//download by try{().newInstance()。//建立數(shù)據(jù) 庫連接Statement stmt= ()。//檢測數(shù)據(jù)庫連接是否成功 return false。 } public static void main(String[] args) { try{ DataBase db = new DataBase()。 }catch(Exception e){ 信息工程系 計(jì)網(wǎng)班第 17 頁 共 50 頁 ()。 這也是一個公共類[3] 。/** * p負(fù)責(zé) 字符串的處理 /p */import .*。public class dataFormat { public dataFormat() { } /** * 把字符串轉(zhuǎn)換成適合于網(wǎng)頁顯示的文本 * param s * return */ public static String toHtml(String s) { if (s==null) return s。,amp。 s=strReplace(s,)。 s=strReplace(s,\,)。 return s。 if (sBody==null || ()) return 。 j = ()。 StringBuffer sss = new StringBuffer(())。 l = i。 ((l,i))。 i += j。 } ((l))。 } /** * 把字符串中的\r\n轉(zhuǎn)換成\n * param String sBody : 要進(jìn)行替換操作的字符串 * param String sEndwith : 要替換成為的字符串 信息工程系 計(jì)網(wǎng)班第 19 頁 共 50 頁 */ public static String parseReturn(String sBody, String sEndwith) { StringTokenizer t = new StringTokenizer(sBody, \r\n)。 boolean bFirst=true。 while (()) { String s=()。 while (( )) s=(2)。 } else { (sEndwith)。 } } return ()。 String html = new String(str)。, amp。 信息工程系 計(jì)網(wǎng)班第 20 頁 共 50 頁 html = strReplace(html, , )。 return html。 return strReplace(sql, 39。39。 }}(3)實(shí)現(xiàn)圖書分類實(shí)體 Bean這個類是對圖書分類實(shí)體的抽象,他包含了 圖書分類實(shí)體的所有屬性及 圖書分類對象的初始化構(gòu)造方法,它的屬性和表Bookclass對應(yīng),部分代 碼如下:package 。 //ID序列號 private String ClassName。 ClassName = 。 信息工程系 計(jì)網(wǎng)班第 21 頁 共 50 頁 ClassName = newname??蛻裘看钨徺I一種商品都會產(chǎn)生一次訂購單,它包括 訂單號,所購買的書號,所購買這種書的數(shù)量等,這些構(gòu)成了這個類的私有屬性, 這些屬性和表Order 對應(yīng)。/** * p訂單類 /p */public class order { private long Id。 //訂單編號 private long UserId。 //提交訂單時(shí)間 private String ConsignmentTime。 //總金額 private String content。 //下單時(shí)IP private boolean IsPayoff。 //是否已發(fā)貨 public order() { //在構(gòu)造方法里初始化變量 Id = 0。 UserId = 0。 ConsignmentTime = 。 content = 。 信息工程系 計(jì)網(wǎng)班第 22 頁 共 50 頁 IsPayoff = false。 } public long getId() { return Id。在 jsp 頁面中通過 jsp:useBean引入。/** * pTitle: /p */public class allorder { private long Id。 //訂單號表序列號 private long BookNo。 //訂貨數(shù)量 public allorder() { Id = 0。 BookNo = 0。 } public long getId() { return Id。在 jsp 頁面中通過 jsp:useBean引入。我在程序里定 義的購物 ,購物時(shí)間,所購書的總價(jià)格都是必不可少的,這個類是對購 物車實(shí)體的抽象,它包含了購物車的所有屬性及購物車對象的初始化構(gòu)造方法。/** * pTitle: /p */public class shopcar { private long bookId。 //選購數(shù)量 public shopcar(){ bookId = 0。 } public long getBookId() { return bookId。圖 為Login 類 的類圖其中只是關(guān)鍵 的幾個方法。其它的是設(shè)置和獲取屬性的方法。判斷登 陸用戶 是否是管理員,如果是 則從管理員信息表中查詢數(shù)據(jù),否則則從普通用 戶表中查詢數(shù)據(jù)。 + (username) + 39。 + (passwd) + 39。 + username + 39。 + passwd + 39。 } 2)Execute()方法 信息工程系 計(jì)網(wǎng)班第 25 頁 共 50 頁 /** * 執(zhí)行查詢 * return * throws */ public boolean excute() throws Exception { boolean flag = false。 ()。 rs = (getSql())。 } flag = true。 return flag。(8)管理圖書 Bean 的編寫該類負(fù)責(zé)圖書的管理,包括圖書 的修改、 查詢、刪除、和添加等,圖 為該類的類圖[5] ,其中省去了部分方法,這里只介紹幾個重要的方法。部分代 碼如下:public boolean getRequest( newrequest) { boolean flag = false。 String ID = (id)。 try{ bookid = (ID)。 String bookname = (bookname)。 sqlflag = false。 String author = (author)。 sqlflag = false。 String publish = (publish)。 } (to_String(publish))。 int bc = (bookclass)。 String bookno = (bookno)。 } (to_String(bookno))。 if (picture == null) { picture = images/。 float price。 } catch (Exception e){ 信息工程系 計(jì)網(wǎng)班第 28 頁 共 50 頁 price = 0。 } (price)。 try{ amount = new Integer((amount)).intValue()。 amount = 0。 String content = (content)。 } (to_String(content))。 } return flag。 } }()方法 該方法負(fù)責(zé)圖書的添加,返回 類型為Boolean型, true表示成功,反之失 敗。代碼如下: /** 信息工程系 計(jì)網(wǎng)班第 29 頁 共 50 頁 * 完成圖書添加 * return * throws */ public boolean insert() throws Exception { sqlStr = insert into book (Bookname,Bookclass,Author,Publish,Bookno,+ Content,Prince,Amount,Leav_number,Regtime,picture) values (39。,39。,39。,39。,39。,39。,39。,39。,39。,。 sqlStr = sqlStr + ()+39。 try{ (sqlStr)。 ()。 (sqlStr)。 }catch (SQLException sqle){ (())。 } }(9)管理圖書分類 Bean 信息工程系 計(jì)網(wǎng)班第 30 頁 共 50 頁由于圖書分類實(shí)體的存在,需要 對圖書進(jìn)行分類查詢、添加、刪除等操作方法,為了方便,把這些方法集合到一個類中,即 Op_bookclass 類, 圖 為該類的類圖,其中也省略了部分方法。Op_bookclassBookclass:bookclassDelete():booleangetBookClassSql():StringInsert():BooleanOp_bookclass():voidsearchBookClass():booleanClasslist:vectoeRequest:HttpServletRequest圖 管理圖書分類的 Op_bookclass 類圖(10)管理用戶的 Bean為了使用上的方便,我把對用戶的管理,包括用戶的添加、刪除、修改、查詢等集合成一個管理類,即Op_user 類。Op_userUser:userUsername:usernameAdd():BooleanDelete():booleanGet_alluser():booleangetGbk():Stringsetusername():voidupdate():booleanMessage:StringPage:intpageCoun
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1