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

正文內(nèi)容

java小球碰撞、學(xué)生信息管理系統(tǒng)實(shí)訓(xùn)報(bào)告-wenkub

2022-12-26 16:42:28 本頁面
 

【正文】 ts(id,name,tall) values(39。 update users set name=39。12345639。139。 JCBC 制定了統(tǒng)一的訪問各類關(guān)系數(shù)據(jù)庫的標(biāo)準(zhǔn)接口,但他不能直接訪問數(shù)據(jù)庫。 四、 對(duì)系統(tǒng)進(jìn)行進(jìn)行整體測(cè)試。 3. 編寫實(shí)現(xiàn)數(shù)據(jù)庫表的添、刪、改、查等操作的數(shù)據(jù)庫操作類,每個(gè)數(shù)據(jù)庫表對(duì)應(yīng)一個(gè)數(shù)據(jù)庫操作類。 二、 進(jìn)行軟件系統(tǒng)的總體設(shè)計(jì)和模塊的設(shè)計(jì)。 這次的實(shí)訓(xùn)也讓我明白了要做好一個(gè)系統(tǒng), 團(tuán)隊(duì)合作永遠(yuǎn)是最重要的,一個(gè)人的力量永遠(yuǎn)是渺小的,團(tuán)隊(duì)分工、合作會(huì)使得問題更加的簡單、解決的迅速。又因?yàn)槔斫猓栽S多原本片片斷斷的知識(shí)都可以漸漸互相融會(huì)貫通,累積技術(shù)能量、理論和實(shí)務(wù)之間的玻璃被打破了,學(xué)習(xí)效率才能倍增。 } public static void main(String[] args) { new BallButton()。 } })。 } })。 (new ActionListener() { public void actionPerformed(ActionEvent event) { (false)。 ActionListener handler1 = null。 start = new JButton(開始 )。 BallButton() { 5 super(碰撞的小球 liudan29)。 import 。 import 。 (panel)。 ExecutorService threadExecutor = ()。 if(y==20) a=0。 int lmb=(6)+1。 l2=。 (ld)。 Random ll= new Random()。 l1=。 y += 1。 l4=。 } else if(a==1) { l0=。 x=1。 l3=。 (x, 90, 20, 20)。 (40, y, 20, 20)。 (20, 20, 360, 360)。 Color l3=。 public class Ball extends JPanel implements Runnable { int y = 200,x=70,a。 import 。 三 、 實(shí)訓(xùn)內(nèi)容 與步驟 代碼如下: package shixun1。 掌握多線程編程的基本原理,能使用 Runnable、 ExecutorService 等接口進(jìn)行線程的創(chuàng)建、啟動(dòng)等工作 。 要求: 界面設(shè)計(jì)、顏色選取等可能美觀。 有能力的同學(xué)可以設(shè)計(jì)圖形界面的操作按鈕,用于改變球的顏色、反彈速度,開始和結(jié)束按鈕等。 培養(yǎng)獨(dú)立查找資料,并解決問題的能力。 import 。 import 。 Color l0=。 2 Color l4=。 (l1)。 (l3)。 } public void run() { while (true) { try { {if( a==0) { l0=。 l4=。 y += 1。 l1=。 Random ll= new Random()。 (lmb)。 l2=。 int ld=(10)+1。 if(x==360) a=3。 l3=。 x=1。 } } } catch (InterruptedException e) { ()。 (panel)。 // add the panel to the frame (400, 420)。 import 。 import 。 final Ball ld = new Ball()。 stop = new JButton(停止 )。 ActionListener handler = null。 threadExecutor = new Thread(ld)。 (new ActionListener() { SuppressWarnings(deprecation) public void actionPerformed(ActionEvent event) { (true)。 add(btn, )。 } } 6 開始狀態(tài)下運(yùn)行的界面: 停止?fàn)顟B(tài)下運(yùn)行的界面: 7 實(shí)訓(xùn)中的問題和解決方法 ( 1)停止按鈕不能控制小球 ( 2)小球碰壁后顏色沒有變化 在遇到問題時(shí),我首先會(huì)先向班上基礎(chǔ)知識(shí)扎實(shí)的同學(xué)請(qǐng)教,如果在同學(xué)的幫助下還不能解決的問題我就會(huì)向老師求助,最終在大家的共同努力下程序加以完善 總結(jié) 在幾天的實(shí)訓(xùn)中我真正體會(huì)到這幾點(diǎn)。 其次態(tài)度要端正,擺正自己的心態(tài),不要以為什么東西上網(wǎng)搜搜就可以了,一定要有自己的東西。 8 實(shí)訓(xùn) 二 基于 java 的學(xué)生信息管理系統(tǒng) 一 、實(shí)訓(xùn)任務(wù)與目的 實(shí)訓(xùn)任務(wù): 編寫圖形界面的應(yīng)用程序,實(shí)現(xiàn)對(duì) Mysql 數(shù)據(jù)庫的添、刪、改、查等操作,實(shí)現(xiàn)易于操作的信息管理系統(tǒng)。 三、 實(shí)現(xiàn)各個(gè)模 塊的功能設(shè)計(jì)和編碼 : 具體包括: 1. 編寫數(shù)據(jù)庫連接類,實(shí)現(xiàn)數(shù)據(jù)庫連接并測(cè)試。根據(jù)系統(tǒng)應(yīng)用的需求定義實(shí)現(xiàn)各個(gè)功能的方法、根據(jù)需求重載方法,使得軟件功能盡可能完善且易于使用。 五、 撰寫實(shí)訓(xùn)報(bào)告(要求見附件文檔)。需要加載驅(qū)動(dòng)才可以使用。,39。,39。mm39。139。17339。 private String name。 = id。 } public void setId(int id) { = id。 } public void setTall(int tall) { = tall。 private String password。 = id。 } public int getId() { return id。 } public String getPassword() { return password。 } } 實(shí)現(xiàn)數(shù)據(jù)庫連接: 將如下代碼保存為 package db。 import 。 //獲得數(shù)據(jù)連接 PreparedStatement ps = conn .prepareStatement(insert into users(id,name,password,level) values(?,?,?,?))。//設(shè)置第 2 個(gè)占位符的內(nèi)容 (4, ())。 } finally { (conn)。 (1, id)。 } finally { 13 (conn)。 PreparedStatement ps = (Sql)。 (4, ())。 } finally { (conn)。// 獲得數(shù)據(jù)連接 // 建立 PreparedStatement 用于執(zhí)行 SQL 操作 PreparedStatement ps = conn .prepareStatement(SELECT * FROM users WHERE id=?)。 } ()。 } public static Iterator getAllUsers() { 14 List l = new ArrayList()。 // 建立 Statement 用于執(zhí)行 SQL 操作 ResultSet rs = (SELECT * FROM users)。 } ()。//返回迭代器對(duì)象 } public static boolean isUsers(String adminName, String adminPassword,int level) { boolean flag = false。 (1,adminName)。 // 執(zhí)行查詢 if (()) {//若有該用戶,則返回真 flag = true。 } finally { (conn)。 //updateUsers(admin)。 for (Iterator it = ()。 } } } 連接數(shù)據(jù)庫成功! 實(shí)現(xiàn)處理表 Students 的 db 將如下代碼保存為 文件 package db。 import 。 //獲得數(shù)據(jù)連接 PreparedStatement ps = conn .prepareStatement(insert into students(id,name,tall) values(?,?,?))。 ()。 } } public static void deleteStudent(int id) { Connection conn = null。 // 設(shè)置第 1 個(gè)占位符的內(nèi)容 ()。 } } public static void updateStudents(Students a) { Connection conn = null。 (1, ())。 // 執(zhí)行更新操作 ()。 Connection conn = null。 // 設(shè)置第一個(gè)占位符的內(nèi)容 ResultSet rs = ()。 } finally { (conn)。 try { conn = ()。//保存 Admin 表中的第 2 個(gè)字段(管理員姓名) while (()) {//循環(huán)得到所有記錄,并添加到數(shù)組列表中 s = (2)。 } finally { (conn)。 //(admin)。 for (Iterator it = ()。 } //(4)。 import 。 try { conn = ()。 (3, ())。 } catch (Exception ex) { ()。 //獲得數(shù)據(jù)連接 PreparedStatement ps = conn .prepareStatement(DELETE FROM users WHERE id=?)。 } catch (Exception ex) { ()。 String Sql = UPDATE users SET name=?,password =? ,level=? WHERE id =?。 (3, ())。 } catch (Exception ex) { ()。 try { conn = ()。 // 執(zhí)行查詢,返回結(jié)果集 if (()) { // 因?yàn)楣芾韱T id 是惟一的,所以只返回一個(gè)結(jié)果既可 a = new Users((1), (4), (3),(1))。 } return a。 // 獲得數(shù)據(jù)連接 Statement stmt = ()。//轉(zhuǎn)換為中文 GBK編碼的字符串 (new Users((1), s, (3),(4)))。 } return ()。 // 獲得數(shù)據(jù)連接 PreparedStatement ps = ( SELECT * FROM users WHERE name=? AND password=? AND level=?)。 ResultSet rs = ()。 } catch (Exception ex) { ()。true:表示有該用戶 } public static void main(String[] args) { // TODO Autogenerated method stub Users admin = new Users(2, yangn, 123456,0)。 //deleteAdmin(2)。 (() + \t + () + \t + ()+ \t + ())。 22 import 。 import 。 impo
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1