團隊名稱:cz
團隊成員:陳偉澤,詹昌錦
團隊照片:html
http://git.oschina.net/Devil299/java201521123111/tree/master/gamejava
比較數據代碼:git
private static int answer; private static java.util.Date start, end; private long diff; private void sureActionPerformed(java.awt.event.ActionEvent evt) { int g = Integer.parseInt(GES.getText()); if (g != answer) { if (g < answer) { AND.setText("too small"); } else if (g > answer) { AND.setText("too big"); } } else { end = new java.util.Date(); diff = end.getTime() - start.getTime(); AND.setText("right"); this.setVisible(false); new MyDialog().setVisible(true); }
排行榜代碼:數據庫
public paihang() throws FileNotFoundException { initComponents(); arrayList = new ArrayList<>(); File datafile = new File("D:\\data.txt"); Scanner scanner = new Scanner(new FileInputStream(datafile)); while (scanner.hasNextLine()) { String string = scanner.nextLine(); String[] strings = string.split(" "); arrayList.add(new User(strings[0], Long.parseLong(strings[1]))); } Collections.sort(arrayList); for (int i = 0; i < arrayList.size(); i++) { String username = arrayList.get(i).username; String time = arrayList.get(i).time + ""; if (i == 0) { jLabel4.setText(username); jLabel7.setText(time); } else if (i == 1) { jLabel6.setText(username); jLabel10.setText(time); } else if (i == 2) { jLabel5.setText(username); jLabel8.setText(time); } else { break; } } scanner.close(); }
1.用教室的電腦總會出現七七八八的問題;
2.界面不太美觀;
3.想要嘗試可否多用戶進行嘗試;
4.想將文本文件存儲改爲數據庫存儲;
5.想學更牛逼的操做!this
陳偉澤(組長)http://www.cnblogs.com/yudi/p/7063528.html
負責博客方面,排行榜的設計,使用netbeans設計部分界面,用文本文件存儲信息。
詹昌錦(組員)http://www.cnblogs.com/zcjj/p/7064020.html
負責輸入輸出界面以及代碼,開始猜數遊戲,對數據比較進行處理。.net