日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

结对

發(fā)布時(shí)間:2025/7/25 编程问答 24 豆豆
生活随笔 收集整理的這篇文章主要介紹了 结对 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

結(jié)對(duì)同伴的學(xué)號(hào)姓名以及同伴的博客地址:343 卓煒杰?http://www.cnblogs.com/mxdmxdmxd78/

結(jié)對(duì)次數(shù)卓煒杰容杰龍預(yù)計(jì)編程時(shí)間(H)結(jié)對(duì)編程時(shí)間(H)總結(jié)
1編碼指導(dǎo)、查詢資料22實(shí)現(xiàn)組合投功能
2編碼、找資料安裝sql2012過程中度過?10?6實(shí)現(xiàn)鏈接數(shù)據(jù)庫
??????
??????

?

代碼例子:

1 package Fuli; 2 import java.sql.*; 3 4 5 6 public class Main { 7 8 public static void main(String [] args) 9 10 { 11 12 String driverName="com.microsoft.sqlserver.jdbc.SQLServerDriver"; 13 14 String dbURL="jdbc:sqlserver://localhost:1433;DatabaseName=K610C-I7-D2-PC"; 15 16 String userName="eclipse"; 17 18 String userPwd="eclipse"; 19 20 try 21 22 { 23 24 Class.forName(driverName); 25 26 Connection dbConn=DriverManager.getConnection(dbURL,userName,userPwd); 27 28 System.out.println("連接數(shù)據(jù)庫成功"); 29 30 } 31 32 catch(Exception e) 33 34 { 35 36 e.printStackTrace(); 37 38 System.out.print("連接失敗"); 39 40 } 41 42 } 43 44 } 1 package Fuli; 2 import java.awt.event.MouseAdapter; 3 import java.awt.event.MouseEvent; 4 5 import javax.swing.Icon; 6 import javax.swing.ImageIcon; 7 import javax.swing.JButton; 8 import javax.swing.JFrame; 9 import javax.swing.JLabel; 10 import javax.swing.JOptionPane; 11 import javax.swing.JTextField; 12 13 import org.dyno.visual.swing.layouts.Constraints; 14 import org.dyno.visual.swing.layouts.GroupLayout; 15 import org.dyno.visual.swing.layouts.Leading; 16 17 18 //VS4E -- DO NOT REMOVE THIS LINE! 19 public class PI extends JFrame { 20 21 private static final long serialVersionUID = 1L; 22 private JTextField jTextField0; 23 private JTextField jTextField2; 24 private JTextField jTextField3; 25 private JTextField jTextField1; 26 private JLabel jLabel0; 27 private JLabel jLabel2; 28 private JLabel jLabel3; 29 private JLabel jLabel1; 30 private JTextField jTextField4; 31 private JTextField jTextField5; 32 private JTextField jTextField6; 33 private JLabel jLabel4; 34 private JLabel jLabel5; 35 private JLabel jLabel6; 36 private JButton jButton0; 37 private JButton jButton1; 38 private JButton jButton2; 39 private JButton jButton3; 40 41 public PI() { 42 initComponents(); 43 } 44 45 private void initComponents() { 46 setTitle("組合計(jì)算"); 47 setLayout(new GroupLayout()); 48 add(getJTextField0(), new Constraints(new Leading(108, 10, 10), new Leading(66, 10, 10))); 49 add(getJTextField2(), new Constraints(new Leading(108, 38, 12, 12), new Leading(161, 10, 10))); 50 add(getJTextField3(), new Constraints(new Leading(108, 38, 12, 12), new Leading(210, 10, 10))); 51 add(getJTextField1(), new Constraints(new Leading(108, 38, 12, 12), new Leading(112, 10, 10))); 52 add(getJLabel0(), new Constraints(new Leading(51, 10, 10), new Leading(68, 12, 12))); 53 add(getJLabel2(), new Constraints(new Leading(51, 8, 12, 12), new Leading(163, 12, 12))); 54 add(getJLabel3(), new Constraints(new Leading(51, 12, 12), new Leading(212, 12, 12))); 55 add(getJLabel1(), new Constraints(new Leading(54, 8, 10, 10), new Leading(114, 12, 12))); 56 add(getJTextField4(), new Constraints(new Leading(291, 38, 10, 10), new Leading(66, 12, 12))); 57 add(getJTextField5(), new Constraints(new Leading(291, 38, 12, 12), new Leading(114, 12, 12))); 58 add(getJTextField6(), new Constraints(new Leading(291, 38, 12, 12), new Leading(161, 12, 12))); 59 add(getJLabel4(), new Constraints(new Leading(245, 8, 10, 10), new Leading(68, 12, 12))); 60 add(getJLabel5(), new Constraints(new Leading(245, 8, 12, 12), new Leading(116, 12, 12))); 61 add(getJLabel6(), new Constraints(new Leading(247, 14, 10, 10), new Leading(163, 12, 12))); 62 add(getJButton0(), new Constraints(new Leading(472, 10, 10), new Leading(60, 12, 12))); 63 add(getJButton1(), new Constraints(new Leading(472, 12, 12), new Leading(116, 12, 12))); 64 add(getJButton2(), new Constraints(new Leading(472, 12, 12), new Leading(174, 10, 10))); 65 add(getJButton3(), new Constraints(new Leading(270, 12, 12), new Leading(270, 10, 10))); 66 setSize(610, 357); 67 } 68 69 private JButton getJButton3() { 70 if (jButton3 == null) { 71 jButton3 = new JButton(); 72 jButton3.setText("計(jì)算結(jié)果"); 73 jButton3.addMouseListener(new MouseAdapter() { 74 75 public void mouseClicked(MouseEvent event) { 76 jButton3MouseMouseClicked(event); 77 } 78 }); 79 } 80 return jButton3; 81 } 82 83 private JButton getJButton2() { 84 if (jButton2 == null) { 85 jButton2 = new JButton(); 86 jButton2.setText("加入定投"); 87 jButton2.addMouseListener(new MouseAdapter() { 88 89 public void mouseClicked(MouseEvent event) { 90 jButton2MouseMouseClicked(event); 91 } 92 }); 93 } 94 return jButton2; 95 } 96 97 private JButton getJButton1() { 98 if (jButton1 == null) { 99 jButton1 = new JButton(); 100 jButton1.setText("加入復(fù)利"); 101 jButton1.addMouseListener(new MouseAdapter() { 102 103 public void mouseClicked(MouseEvent event) { 104 jButton1MouseMouseClicked(event); 105 } 106 }); 107 } 108 return jButton1; 109 } 110 111 private JButton getJButton0() { 112 if (jButton0 == null) { 113 jButton0 = new JButton(); 114 jButton0.setText("加入單利"); 115 jButton0.addMouseListener(new MouseAdapter() { 116 117 public void mouseClicked(MouseEvent event) { 118 jButton0MouseMouseClicked(event); 119 } 120 }); 121 } 122 return jButton0; 123 } 124 125 private JLabel getJLabel6() { 126 if (jLabel6 == null) { 127 jLabel6 = new JLabel(); 128 jLabel6.setText("n"); 129 } 130 return jLabel6; 131 } 132 133 private JLabel getJLabel5() { 134 if (jLabel5 == null) { 135 jLabel5 = new JLabel(); 136 jLabel5.setText("x"); 137 } 138 return jLabel5; 139 } 140 141 private JLabel getJLabel4() { 142 if (jLabel4 == null) { 143 jLabel4 = new JLabel(); 144 jLabel4.setText("a"); 145 } 146 return jLabel4; 147 } 148 149 private JTextField getJTextField6() { 150 if (jTextField6 == null) { 151 jTextField6 = new JTextField(); 152 jTextField6.setText("0 "); 153 } 154 return jTextField6; 155 } 156 157 private JTextField getJTextField5() { 158 if (jTextField5 == null) { 159 jTextField5 = new JTextField(); 160 jTextField5.setText("0 "); 161 } 162 return jTextField5; 163 } 164 165 private JTextField getJTextField4() { 166 if (jTextField4 == null) { 167 jTextField4 = new JTextField(); 168 jTextField4.setText("0 "); 169 } 170 return jTextField4; 171 } 172 173 private JLabel getJLabel1() { 174 if (jLabel1 == null) { 175 jLabel1 = new JLabel(); 176 jLabel1.setText("i"); 177 } 178 return jLabel1; 179 } 180 181 private JLabel getJLabel3() { 182 if (jLabel3 == null) { 183 jLabel3 = new JLabel(); 184 jLabel3.setText("A"); 185 } 186 return jLabel3; 187 } 188 189 private JLabel getJLabel2() { 190 if (jLabel2 == null) { 191 jLabel2 = new JLabel(); 192 jLabel2.setText("n"); 193 } 194 return jLabel2; 195 } 196 197 private JLabel getJLabel0() { 198 if (jLabel0 == null) { 199 jLabel0 = new JLabel(); 200 jLabel0.setText("P"); 201 } 202 return jLabel0; 203 } 204 205 private JTextField getJTextField1() { 206 if (jTextField1 == null) { 207 jTextField1 = new JTextField(); 208 jTextField1.setText("0 "); 209 } 210 return jTextField1; 211 } 212 213 private JTextField getJTextField3() { 214 if (jTextField3 == null) { 215 jTextField3 = new JTextField(); 216 jTextField3.setText("0 "); 217 } 218 return jTextField3; 219 } 220 221 private JTextField getJTextField2() { 222 if (jTextField2 == null) { 223 jTextField2 = new JTextField(); 224 jTextField2.setText("0 "); 225 } 226 return jTextField2; 227 } 228 229 private JTextField getJTextField0() { 230 if (jTextField0 == null) { 231 jTextField0 = new JTextField(); 232 jTextField0.setText("0 "); 233 } 234 return jTextField0; 235 } 236 237 double sum=0; 238 Icon ico=new ImageIcon("./src/Fuli.png"); 239 240 private void jButton0MouseMouseClicked(MouseEvent event) { 241 try 242 {double P=Double.parseDouble(getJTextField0().getText()), 243 i=Double.parseDouble(getJTextField1().getText()), 244 n=Double.parseDouble(getJTextField2().getText()), 245 A=Double.parseDouble(getJTextField3().getText()); 246 double F=0; 247 if(n>60) 248 JOptionPane.showMessageDialog(jButton0, "超過60年限","出錯(cuò)", JOptionPane.INFORMATION_MESSAGE); 249 else if(i>1) 250 JOptionPane.showMessageDialog(jButton0, "利率應(yīng)小于1","出錯(cuò)", JOptionPane.INFORMATION_MESSAGE); 251 252 253 if(i==0&&P==0&&n==0&&A==0) 254 JOptionPane.showMessageDialog(jButton0, "你沒有輸入任何數(shù)", "真的福利",JOptionPane.INFORMATION_MESSAGE,ico);else{ 255 F=sumofthey.F1(P, i, n, A); 256 sum=sum+F; 257 JOptionPane.showMessageDialog(jButton0, "F="+F,"本次計(jì)算結(jié)果", JOptionPane.INFORMATION_MESSAGE);}}catch(Exception e){JOptionPane.showMessageDialog(jButton0, "請(qǐng)輸入數(shù)字","出錯(cuò)", JOptionPane.INFORMATION_MESSAGE);} 258 } 259 260 private void jButton1MouseMouseClicked(MouseEvent event) { 261 try 262 {double P=Double.parseDouble(getJTextField0().getText()), 263 i=Double.parseDouble(getJTextField1().getText()), 264 n=Double.parseDouble(getJTextField2().getText()), 265 A=Double.parseDouble(getJTextField3().getText()), 266 F=0; 267 if(n>60) 268 JOptionPane.showMessageDialog(jButton0, "超過60年限","出錯(cuò)", JOptionPane.INFORMATION_MESSAGE); 269 else if(i>1) 270 JOptionPane.showMessageDialog(jButton0, "利率應(yīng)小于1","出錯(cuò)", JOptionPane.INFORMATION_MESSAGE); 271 272 273 if(i==0&&P==0&&n==0&&A==0&&F==0) 274 JOptionPane.showMessageDialog(jButton0, "你沒有輸入任何數(shù)", "真的福利",JOptionPane.INFORMATION_MESSAGE,ico);else{ 275 F=sumofthey.F2(P, i, n, A); 276 sum=sum+F; 277 JOptionPane.showMessageDialog(jButton0, "F="+F,"本次計(jì)算結(jié)果", JOptionPane.INFORMATION_MESSAGE);}}catch(Exception e){JOptionPane.showMessageDialog(jButton0, "請(qǐng)輸入數(shù)字","出錯(cuò)", JOptionPane.INFORMATION_MESSAGE);} 278 279 } 280 281 private void jButton2MouseMouseClicked(MouseEvent event) { 282 try{ 283 double a=Double.parseDouble(getJTextField4().getText()), 284 x=Double.parseDouble(getJTextField5().getText()), 285 n=Double.parseDouble(getJTextField6().getText()); 286 if(n>60) 287 JOptionPane.showMessageDialog(jButton0, "超過60年限","出錯(cuò)", JOptionPane.INFORMATION_MESSAGE); 288 else if(x>1) 289 JOptionPane.showMessageDialog(jButton0, "利率應(yīng)小于1","出錯(cuò)", JOptionPane.INFORMATION_MESSAGE); 290 291 double M=sumofthey.M(a, x, n);sum=sum+M; 292 if(x==0&&n==0&&a==0) 293 JOptionPane.showMessageDialog(jButton0, "你沒有輸入任何數(shù)", "真的福利",JOptionPane.INFORMATION_MESSAGE,ico); 294 else 295 JOptionPane.showMessageDialog(jButton0, "M="+M,"計(jì)算結(jié)果", JOptionPane.INFORMATION_MESSAGE);} 296 catch(Exception e){JOptionPane.showMessageDialog(jButton0, "請(qǐng)輸入數(shù)字","出錯(cuò)", JOptionPane.INFORMATION_MESSAGE);} 297 } 298 299 private void jButton3MouseMouseClicked(MouseEvent event) { 300 JOptionPane.showMessageDialog(jButton0, "SUM="+sum,"計(jì)算結(jié)果", JOptionPane.INFORMATION_MESSAGE); 301 } 302 }

截圖顯示結(jié)果:1.單利測試: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??

? ? ? ?

?

2.組合投資:

?

?

3.數(shù)據(jù)庫連接:

?

詳細(xì)代碼地址:https://github.com/IAMWicker/New-6.0.git

?

收獲到和感悟:兩個(gè)人合作的效率的確勝過兩個(gè)人分開做,這次我主要做提醒、分析、給意見的角色,煒杰主要做編程工作。在第一次合作時(shí)效率比較高,此后由于自己安裝微軟的sql2012出錯(cuò),弄著弄著系統(tǒng)就崩潰了,幸虧隊(duì)友幫我重裝系統(tǒng),可是很多軟件都要重新安裝,很麻煩。所以最后的鏈接數(shù)據(jù)庫保存數(shù)據(jù)都靠隊(duì)友的鼎力支持了。所以,結(jié)對(duì)合作是一個(gè)互幫互助,互補(bǔ)性的過程。所以,非常感謝隊(duì)友的幫助。

工作時(shí)的照片:

轉(zhuǎn)載于:https://www.cnblogs.com/57rongjielong/p/5358005.html

總結(jié)

以上是生活随笔為你收集整理的结对的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。