版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、练习列表注: 理解级别 掌握级别 应用级别练习 :重定向 JJ+SV9KXRKZ PGG1VGIQGMK KH!OSVUXZ PGG OU /5+IKVZOUT! OSVUXZ PGG OU 6XOTZ=XOZKX! OSVUXZ PGG YWR )UTTKIZOUT! OSVUXZ PGG YWR *XOKX3GTGMKX!OSVUXZ PGG YWR 6XKVGXKJ9ZGZKSKTZ!OSVUXZ PGG YWR 972+IKVZOUT!OSVUXZ PGG YKXRKZ 9KXRKZ+IKVZOUT! OSVUXZ PGG YKXRKZ NZZV .ZZV9KXRKZ!OSVUXZ P
2、GG YKXRKZ NZZV .ZZV9KXRKZ8KWKYZ!OSVUXZ PGG YKXRKZ NZZV .ZZV9KXRKZ8KYVUTYK! VHROI IRGYY JJ+SV9KXRKZ KZKTJY .ZZV9KXRKZaVHROI UOJ YKXOIK .ZZV9KXRKZ8KWKYZ XKWKYZ .ZZV9KXRKZ8KYVUTYK XKYVUTYK 名称描述级别 重定向掌握重定向的语句,理解重定向的流程 雇员的增删改查综合练9KXRKZ 中进行数据库操作,掌握 S_YWR 数据库的使用方法 *5 及工厂模式理解 *5 的含义,在今后的编程过程中融入 *5 的操作,理解工厂模
3、式并尽量达到熟练应用 2ZNXUY 9KXRKZ+IKVZOUT /5+IKVZOUTa 这行代码要放在MKZ6GXGSKZKX 执行之前。 XKWKYZ YKZ)NGXGIZKX+TIUJOTM ZL !9ZXOTM TGSK # XKWKYZ MKZ6GXGSKZKX TGSK ! JUHRK YGRGX_ # *UHRK VGXYK*UHRK XKWKYZ MKZ6GXGSKZKX YGRGX_ !OTZ GMK # /TZKMKX VGXYK/TZ XKWKYZ MKZ6GXGSKZKX GMK !9_YZKS UZ VXOTZRT TGSK TGSK !9_YZKS UZ VXOTZ
4、RT YGRGX_ YGRGX_ !9_YZKS UZ VXOTZRT GMK GMK !数据库)UTTKIZOUT IUTT # TRR!ZX_ a)RGYY LUX4GS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%$ KH GVV KXYOUT# SRTY# NZZV PGG YT IUS SR TY P KK SRTY YO# NZZV UXM 329INKSG OTYZGTIK YO YINKSG2UIGZOUT#NZSR$ NKGJ$SKZG NZZV KWO# )UTZKTZ :_VK IUTZKTZ# ZKZ NZSR! INGXYKZ#;:, $ZOZRK$/TYKXZ ZOZRK NKXK ZOZRK$ NKGJ$HUJ_ Y
12、Z_RK# LUTZ YOK V!IURUX XKJ! $发生了系统错误,请稍后G NXKL# GJJ+SV NZSR $重试 G$ HUJ_$ NZSR$IUTZKTZ# ZKZ NZSR! INGXYKZ#ZL $ZOZRK$GJJ+SV ZOZRK$ NKGJ$HUJ_ YZ_RK# LUTZ YOK V! $LUXS GIZOUT# GJJ SKZNUJ# VUYZ $ LOKRJYKZ$RKMKTJ$添加雇员 RKMKTJ$ OTVZ TGSK# TGSK $HX $薪水 OTVZ TGSK# YGRGX_ $HX $ OTVZ TGSK# GMK $HX $OTVZ Z_VK# Y
13、HSOZ GRK# 确认 $ LOKRJYKZ$ LUXS$ HUJ_$ NZSR$执行结果 开启 :)6 /6 3UTOZUX,“NZZV RUIGRNUYZ KH GJJ+SV NZSR”7 NZZV PGG YT IUS SR TY P KKNZZV PGG YT IUS SR TY P KK KH GVVE E YJ $ YKXRKZ$YKXRKZ TGSK$GJJ+SV9KXRKZ YKXRKZ TGSK$ YKXRKZ IRGYY$KH JJ+SV9KXRKZ YKXRKZ IRGYY$ YKXRKZ$YKXRKZ$YKXRKZ TGSK$ROYZ+SV9KXRKZ YKXRKZ
14、TGSK$ YKXRKZ IRGYY$KH 2OYZ+SV9KXRKZ YKXRKZ IRGYY$ YKXRKZ$YKXRKZ SGVVOTM$YKXRKZ TGSK$GJJ+SV9KXRKZ YKXRKZ TGSK$ XR VGZZKXT$ GJJ XR VGZZKXT$ YKXRKZ SGVVOTM$ YKXRKZ SGVVOTM$ YKXRKZ TGSK$ROYZ+SV9KXRKZ YKXRKZ TGSK$ XR VGZZKXT$ ROYZ XR VGZZKXT$ YKXRKZ SGVVOTM$KXXUX VGMK$ 方式 KXXUX IUJK$ KXXUX IUJK$ $ 方式 $KI
15、KVZOUT Z_VK$PGG YKXRKZ 9KXRKZ+IKVZOUT KIKVZOUT Z_VK$RUIGZOUT$ KXXUX NZSR RUIGZOUT$ KXXUX VGMK$ KH GVV$点击“确定”提交数据 页面直接跳转到“NZZV RUIGRNUYZ KH ROYZ” :)6 /6 3UTOZUX 显示8练习 :雇员的增删改查 2OYZ+SV9KXRKZ PGG9VGIQGMK KH!OSVUXZ PGG OU /5+IKVZOUT! OSVUXZ PGG OU 6XOTZ=XOZKX! OSVUXZ PGG YWR )UTTKIZOUT! OSVUXZ PGG YWR *
16、XOKX3GTGMKX! OSVUXZ PGG YWR 8KYRZ9KZ!OSVUXZ PGG YWR 972+IKVZOUT! OSVUXZ PGG YWR 9ZGZKSKTZ!OSVUXZ PGG YKXRKZ 9KXRKZ+IKVZOUT! OSVUXZ PGG YKXRKZ NZZV .ZZV9KXRKZ!OSVUXZ PGG YKXRKZ NZZV .ZZV9KXRKZ8KWKYZ! OSVUXZ PGG YKXRKZ NZZV .ZZV9KXRKZ8KYVUTYK!VHROI IRGYY 2OYZ+SV9KXRKZ KZKTJY .ZZV9KXRKZa10VHROI UOJ YKX
17、OIK .ZZV9KXRKZ8KWKYZ XKWKYZ .ZZV9KXRKZ8KYVUTYK XKYVUTYK ZNXUY 9KXRKZ+IKVZOUT /5+IKVZOUTa数据库)UTTKIZOUT IUTT # TRR!ZX_ a)RGYY LUX4GSK IUS S_YWR PJHI *XOKX !IUTT #*XOKX3GTGMKX MKZ)UTTKIZOUT PJHI S_YWR RUIGRNUYZ PJ JH XUUZ XUUZ ! 9ZGZKSKTZ YZGZ #IUTT IXKGZK9ZGZKSKTZ !8KYRZ9KZ XYZ # YZGZ KKIZK7KX_ YKRKIZ
18、 LXUS ZEKSV ! 使用查询得到的结果,生成一个表格 XKYVUTYK YKZ)UTZKTZ:_VK ZKZ NZSR!INGXYKZ#ZL !6X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SKTZ OTYKXZ OTZU ZE
36、KSV TGSK YGRGX_ GMK GRKY % % % !VXKV YKZ9ZXOTM TGSK ! VXKV YKZ*UHRK YGRGX_ !VXKV YKZ/TZ GMK ! VXKV KKIZK;VJGZK ! XKYVUTYK YKZ)UTZKTZ:_VK ZKZ NZSR!INGXYKZ#ZL !6XOTZ=XOZKX UZ # XKYVUTYK MKZ=XOZKX !UZ VXOTZRT 添加雇员成功 ! UZ VXOTZRT G NXKL# ROYZ $ GJJ+SV NZSR19NZSR$NKGJ$SKZG NZZV KWO# )UTZKTZ :_VK IUTZKTZ#
37、 ZKZ NZSR! INGXYKZ#ZL $ ZOZRK$GJJ+SV ZOZRK$ NKGJ$HUJ_ YZ_RK# LUTZ YOK V! $LUXS GIZOUT# GJJ SKZNUJ# VUYZ $ LOKRJYKZ$RKMKTJ$添加雇员 RKMKTJ$ OTVZ TGSK# TGSK $HX $薪水 OTVZ TGSK# YGRGX_ $HX $ 查看雇员 G$ ! UZ IRUYK ! 重定向XKYVUTYK YKTJ8KJOXKIZ ROYZ !c IGZIN +IKVZOUT K a YZKV 先日志K VXOTZ9ZGIQ:XGIK ! YZKV 抛出ZNXU TK 9
38、KXRKZ+IKVZOUT K !cLOTGRR_aOL IUTT #TRR aZX_ aIUTT IRUYK !c IGZIN 972+IKVZOUT K a K VXOTZ9ZGIQ:XGIK !ccccc KXXUX NZSR KH SR20%SR KXYOUT# KTIUJOTM# ;:, %$KH GVV KXYOUT# SRTY# NZZV PGG YT IUS SR TY P KK SRTY YO# NZZV UXM 329INKSG OTYZGTIK YO YINKSG2UIGZOUT# NZZV PGG YT IUS SR TY P KKNZZV PGG YT IUS SR
39、TY P KK KH GVVE E YJ $ YKXRKZ$YKXRKZ TGSK$GJJ+SV9KXRKZ YKXRKZ TGSK$ YKXRKZ IRGYY$KH JJ+SV9KXRKZ YKXRKZ IRGYY$ YKXRKZ$ YKXRKZ$YKXRKZ TGSK$ROYZ+SV9KXRKZ YKXRKZ TGSK$ YKXR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KZ TGSK$SUJOL
43、_+SV9KXRKZ YKXRKZ TGSK$ XR VGZZKXT$ SUJOL_ XR VGZZKXT$ YKXRKZ SGVVOTM$KXXUX VGMK$KXXUX IUJK$ KXXUX IUJK$ RUIGZOUT$ KXXUX NZSR RUIGZOUT$ KXXUX VGMK$ KH GVV$练习 :*5 及工厂模式项目结构 参考代码 +SVRU_KK PGG22VGIQGMK KTZOZ_! 实体类&GZNUX ZKGINKX +SVRU_KK*5 PGG23VGIQGMK JGU!OSVUXZ PGG ZOR 2OYZ! OSVUXZ KTZOZ_ +SVRU_KK! *
44、*5 接口&GZNUX ZKGINKX VHROI OTZKXLGIK +SVRU_KK*5 a VHROI UOJ YGK +SVRU_KK K ZNXUY 972+IKVZOUT!这种方式不好 因为出现了 PJHI 的异常类,这就要求实现该方法叧能使用PJHI VHROI 2OYZ+SVRU_KK$ LOTJRR ZNXUY +IKVZOUT!VHROI UOJ JKRKZK RUTM OJ ZNXUY +IKVZOUT! VHROI IRGYY +SVRU_KK aVXOGZK RUTM OJ! VXOGZK 9ZXOTM TGSK! VXOGZK JUHRK YGRGX_! VXOGZ
45、K OTZ GMK!VHROI OTZ MKZMK aXKZXT GMK!cVHROI UOJ YKZMK OTZ GMK aZNOY GMK # GMK!cVHROI RUTM MKZ/J aXKZXT OJ!cVHROI UOJ YKZ/J RUTM OJ aZNOY OJ # OJ!c VHROI 9ZXOTM MKZ4GSK aXKZXT TGSK!c VHROI UOJ YKZ4GSK 9ZXOTM TGSK aZNOY TGSK # TGSK!cVHROI JUHRK MKZ9GRGX_ aXKZXT YGRGX_!cVHROI UOJ YKZ9GRGX_ JUHRK YGRGX_
46、 aZNOY YGRGX_ # YGRGX_!cc +SVRU_KK*50JHI/SVR PGG24VGIQGMK JGU OSVR!OSVUXZ PGG YWR )UTTKIZOUT!OSVUXZ PGG YWR 6XKVGXKJ9ZGZKSKTZ! OSVUXZ PGG YWR 8KYRZ9KZ!OSVUXZ PGG YWR 9ZGZKSKTZ! OSVUX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V TGSK YGRGX_ GMK GRKY % % % !VXKV YKZ9ZXOTM K MKZ4GSK !VXKV YKZ*UHRK K MKZ9GRGX_ ! VXKV YKZ/TZ K MKZMK !VXKV KKIZK;VJGZK !*(;ZOR IRUYK IUTT !cVHROI +SVRU_KK LOTJ(_/J RUTM OJ ZNXUY +IKVZOUT a)UTTKIZOUT IUTT # *(;ZOR MKZ)UTTKIZOUT ! +SVRU_KK*5.OHKX
51、TGZK/SVR PGG26VGIQGMK JGU OSVR!6XKVGXKJ9ZGZKSKTZ VXKV #IUTT VXKVGXK9ZGZKSKTZ YKRKIZ LXUS ZEKSV NKXK OJ#% !VXKV YKZ2UTM OJ !8KYRZ9KZ XYZ # VXKV KKIZK7KX_ !+SVRU_KK K # TRR!OL XYZ TKZ aK # TK +SVRU_KK !K YKZ/J OJ !K YKZ4GSK XYZ MKZ9ZXOTM TGSK ! K YKZ9GRGX_ XYZ MKZ*UHRK YGRGX_ !K YKZMK XYZ MKZ/TZ GMK !
52、c*(;ZOR IRUYK IUTT ! XKZXT K!cVHROI UOJ VJGZK +SVRU_KK K ZNXUY +IKVZOUT a)UTTKIZOUT IUTT # *(;ZOR MKZ)UTTKIZOUT ! 6XKVGXKJ9ZGZKSKTZ VXKV #IUTT VXKVGXK9ZGZKSKTZ VJGZK ZEKSV YKZ TGSK#% YGRGX_#% GMK#% NKXK OJ#% ! VXKV YKZ9ZXOTM K MKZ4GSK !VXKV YKZ*UHRK K MKZ9GRGX_ ! VXKV YKZ/TZ K MKZMK !VXKV YKZ2UTM K
53、MKZ/J !VXKV KKIZK;VJGZK !*(;ZOR IRUYK IUTT !ccOSVUXZ PGG ZOR 2OYZ!OSVUXZ JGU +SVRU_KK*5! OSVUXZ KTZOZ_ +SVRU_KK! JGU 的另外一个实现&GZNUX ZKGINKX VHROI IRGYY +SVRU_KK*5.OHKXTGZK/SVR OSVRKSKTZY +SVRU_KK*5aVHROI UOJ JKRKZK RUTM OJ ZNXUY +IKVZOUT acVHROI 2OYZ+SVRU_KK$ LOTJRR ZNXUY +IKVZOUT a 9_YZKS UZ VXOTZRT
54、 NOHKXTGZK 实现 LOTJRR !XKZXT TRR!cVHROI +SVRU_KK LOTJ(_/J RUTM OJ ZNXUY +IKVZOUT a XKZXT TRR!cVHROI UOJ YGK +SVRU_KK K ZNXUY +IKVZOUT acVHROI UOJ VJGZK +SVRU_KK K ZNXUY +IKVZOUT acc :KYZ*5 PGG27 *5,GIZUX_ PGG28VGIQGMK ZOR!OSVUXZ JGU OSVR +SVRU_KK*5.OHKXTGZK/SVR!VGIQGMK ZKYZ!OSVUXZ PGG ZOR 2OYZ!OSVUXZ
55、 JGU +SVRU_KK*5!OSVUXZ JGU OSVR +SVRU_KK*50JHI/SVR! OSVUXZ KTZOZ_ +SVRU_KK!VHROI IRGYY :KYZ*5 aVHROI YZGZOI UOJ SGOT 9ZXOTMAC GXMY ZNXUY +IKVZOUT a+SVRU_KK*5 JGU # TK +SVRU_KK*50JHI/SVR ! 查找全部 2OYZ+SVRU_KK$ KSVRU_KKY # JGU LOTJRR !9_YZKS UZ VXOTZRT KSVRU_KKY YOK ! 删除 JGU JKRKZK !数据 +SVRU_KK K # TK +
56、SVRU_KK ! K YKZ4GSK GHI ! K YKZ9GRGX_ ! K YKZMK ! JGU YGK K ! 按 OJ 查找 +SVRU_KK K # JGU LOTJ(_/J ! 9_YZKS UZ VXOTZRT K MKZ4GSK !cc *(;ZOR PGG29VGIQGMK ZOR!OSVUXZ PGG YWR )UTTKIZOUT! OSVUXZ PGG YWR *XOKX3GTGMKX! OSVUXZ PGG YWR 972+IKVZOUT! PJHI 工具类,提供获得连接、关闭连接的方法&GZNUX ZKGINKX VHROI IRGYY *(;ZOR aVHRO
57、I YZGZOI )UTTKIZOUT MKZ)UTTKIZOUT ZNXUY +IKVZOUTa)UTTKIZOUT IUTT # TRR!ZX_ a)RGYY LUX4GSK IUS S_YWR PJHI *XOKX ! IUTT # *XOKX3GTGMKX MKZ)UTTKIZOUT PJHI S_YWR RUIGRNUYZ PJ JH XUUZ XUUZ !OSVUXZ JGU OSVR +SVRU_KK*50JHI/SVR! JGU 工厂,为调用者提供 JGU 实现类的实例&GZNUX ZKGINKX VHROI IRGYY *5,GIZUX_ aVHROI YZGZOI 5HPK
58、IZ MKZ/TYZGTIK 9ZXOTM Z_VK a 5HPKIZ UHP # TRR!OL Z_VK KWGRY +SVRU_KK*5 a UHP # TK +SVRU_KK*50JHI/SVR ! UHP # TK +SVRU_KK*5.OHKXTGZK/SVR !cXKZXT UHP!cc JJ+SV9KXRKZ PGG30VGIQGMK KH!OSVUXZ PGG OU /5+IKVZOUT! OSVUXZ PGG OU 6XOTZ=XOZKX! OSVUXZ PGG YWR )UTTKIZOUT! OSVUXZ PGG YWR *XOKX3GTGMKX!OSVUXZ PGG YW
59、R 6XKVGXKJ9ZGZKSKTZ! OSVUXZ PGG YWR 972+IKVZOUT!OSVUXZ PGG YKXRKZ 9KXRKZ+IKVZOUT! OSVUXZ PGG YKXRKZ NZZV .ZZV9KXRKZ!OSVUXZ PGG YKXRKZ NZZV .ZZV9KXRKZ8KWKYZ!c IGZIN +IKVZOUT K aK VXOTZ9ZGIQ:XGIK !ZNXU K!cXKZXT IUTT!cVHROI YZGZOI UOJ IRUYK )UTTKIZOUT IUTT a OL IUTT #TRR aZX_ aIUTT IRUYK !c IGZIN 972+I
60、KVZOUT K a K VXOTZ9ZGIQ:XGIK !ccc 用于测试*(;ZORVHROI YZGZOI UOJ SGOT 9ZXOTMAC GXMY ZNXUY +IKVZOUT a9_YZKS UZ VXOTZRT MKZ)UTTKIZOUT !cc31OSVUXZ PGG YKXRKZ NZZV .ZZV9KXRKZ8KYVUTYK!OSVUXZ JGU +SVRU_KK*5!OSVUXZ JGU OSVR +SVRU_KK*50JHI/SVR! OSVUXZ KTZOZ_ +SVRU_KK!VHROI IRGYY JJ+SV9KXRKZ KZKTJY .ZZV9KXRKZa V
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 餐饮服务投标风险控制
- 桥梁排水系统防冻施工合同
- 图书馆内部装修协议
- 劳动安装合同范例
- 手提袋合同模板
- 口罩机购销合同范例
- 开挖机司机合同模板
- 施工合同模板里买
- 工地沙石采购合同模板
- Unit 3.单元知识点讲解高一英语讲义(上教版必修二)
- 急性脑梗机械取栓PPT课件
- 六年级语文命题比赛一等奖作品
- 文化空间室内设计
- 初中物理实验室课程表
- 贵州省建筑业营改增建筑工程计价依据调整实施意见(试行)解读519
- GB∕T 15829-2021 软钎剂 分类与性能要求
- 南充市物业服务收费管理实施细则
- 浦东新区“十一五”学科带头人、骨干教师培养和发展方案
- 户外广告设施检验规范
- GB T 197-2018 普通螺纹 公差(高清版)
- 【课件】第16课变革与突破——19世纪西方美术课件高中美术人教版(2019)美术鉴赏
评论
0/150
提交评论