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

正文內容

在線作業(yè)系統(tǒng)的設計與實現(xiàn)畢業(yè)論文(編輯修改稿)

2025-07-16 16:25 本頁面
 

【文章內容簡介】 系統(tǒng)接受用戶在界面上輸入數據,系統(tǒng)應對錯誤的數據和結構不合理的數據進行識別,拒絕接受錯誤數據和結構不合理數據。 系統(tǒng)的實現(xiàn):所有Action類GradeHomeworkT_homeworkListT_cDisplayHomeworkDeleteSubmitStatusStdhwDownloadHomeworkUploadHwanswerdownloadHwdownloadIfsessionSaveScoreStdhwDisplayHwrecord(DAO)Homework(entity)SubmitStatus (entity)Remark(entity)StdnHomework(entity) 圖61系統(tǒng)的類圖設計 系統(tǒng)代碼展示:現(xiàn)針對作業(yè)系統(tǒng)的教師模塊貼出關鍵代碼:(1)把教師及課程信息列表存到session的Action主要代碼 public String execute() throws Exception { remarks = (t_id) 。 HttpServletRequest request = ()。 HttpSession session = ()。 (remarks, remarks)。 tc_id=(t_id)。 (tc_id, tc_id)。 return SUCCESS 。 } }(2)顯示作業(yè)列表的Action主要代碼 public String execute() throws Exception { int a =1。 homeworks = (tc_id, pageSize, pageNow) 。 HttpServletRequest request = ()。 HttpSession session = ()。 (tc_id, tc_id)。 String c_name=(tc_id)。 (c_name, c_name)。 return SUCCESS 。 } }(3)作業(yè)上傳Action主要代碼public String getCurrentDate(){ Calendar calendar = new GregorianCalendar()。 int month=()+1。 String currentDate=()++month++()。 return currentDate。}public String execute() throws Exception { if(file==null){ return ERROR。 } HttpServletRequest request = ()。 HttpSession session = ()。 tc_id=(Integer)(tc_id)。 savepath=savepath+(tc_id)+/。//tc_id的值是否有變 File f=new File(savepath)。 String savefilepath2。 String savefilepath1。 if(!()) ()。 savefilepath1=savepath+().get(0)。 File target1=new File(savefilepath1)。 if(!()){ ()。 ((0), target1)。 }else{ return INPUT。 } String a=().get(1)。 if(!()){ savefilepath2=savepath+().get(1)。 File target2=new File(savefilepath2)。 if(!()){ ()。 ((1), target2)。 }else{ File file=new File(savefilepath1)。 ()。 return INPUT。 } }else{ savefilepath2=。 } currentdate=getCurrentDate()。 String hwname=(0)。 hwname=(0, (.))。 if(test==null||()){ result=(hwname,savefilepath1,savefilepath2,currentdate,tc_id,1)。//即時上傳 }else{ if((test).after((currentdate))){ result=(hwname,savefilepath1,savefilepath2,test,tc_id,2)。//定時上傳 }else{ result=(hwname,savefilepath1,savefilepath2,currentdate,tc_id,1)。//即時上傳 } } if(result){ return SUCCESS。 }else{return ERROR。} }}(4)刪除作業(yè)的Action主要代碼//刪除文件public void delfile(String filesavepath){ File file= new File(filesavepath)。 ()。}public String execute() throws Exception { String[] hwsavepath=null。 savepath=(hw_id)。 int a=。 if(a0){ for(int i=0。i。i++){ //刪除相應hw_id的學生作業(yè) delfile(savepath[i])。 } } hwsavepath=(hw_id)。 delfile(hwsavepath[0])。 if(!hwsavepath[1].equals()) delfile(hwsavepath[1])。 boolean result= (hw_id)。 HttpServletRequest request = ()。 HttpSession session = ()。 tc_id=(Integer)(tc_id)。 if (result == true){ return SUCCESS。 } else{ return ERROR。 } }}(5)作業(yè)下載的Action主要代碼(與學生作業(yè)下載以及答案下載代碼與之相似,故略) public InputStream getFile() throws Exception{ // 添加要下載的文件名 String filelocation = (hw_id,1)。 contentDisposition = (hw_id,1)。 File file = new File(filelocation)。 InputStream is = new FileInputStream(file)。 return is。 }}(6)存放數據訪問代碼的HwrecordDao的主要代碼public class HWrecord { private DataSource ds = null。 private Connection conn = null。 private PreparedStatement stat = null。 private PreparedStatement stat1 = null。 private PreparedStatement stat2= null。 private ResultSet rs = null。 private ResultSet rs1 = null。 private ResultSet rs2 = null。 //使用數據源連接數據庫 public Connection getCon(){ try { InitialContext ctx = new InitialContext()。 ds =(DataSource)(java:p/env/jdbc/edumgrsys)。 conn = ()。 return conn。 }catch(Exception e){ (數據庫連接異常:+())。 return null。 } } //關閉數據庫連接 public void CloseConn(){ try { ()。 }catch(Exception e){ (數據庫連接關閉異常+())。 } } //插入作業(yè)記錄 public boolean insertHW(String filename,String hwsavepath,String answerkey,String date,int tc_id,int type) throws IOException{ String sql1=null。 conn = ()。 int num=0。 try{ if(type==1){ sql1=insert into tb_homework(filename,filepath,answerkey,submitdate,tc_id) values (39。+filename+39。,39。+hwsavepath+39。,39。+answerkey+39。,39。+date+39。,+tc_id+)。 }else{ String sql2=select num from recordeventnum where id=1。//從數據庫取出作業(yè)名組成 stat=(sql2)。 rs=()。 if(()) num=(1)。 sql1=CREATE EVENT hwevent+num+ ON SCHEDULE AT 39。+date+ 00:00:0039。 DO insert into tb_homework(filename,filepath,answerkey,submitdate,tc_id) values (39。+filename+39。,39。+hwsavepath+39。,39。+answerkey+39。,39。+date+39。,+tc_id+)。 num++。 String sql=update recordeventnum set num=+num+ where id=1。 stat = (sql)。 () 。 } if (()!=null ) { stat = (sql1)。 () 。 } }catch(SQLExcept
點擊復制文檔內容
研究報告相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1