プログラマーの卵のためのタイピング練習(5分間)
ひとつの基準として、23問目まで出来ると第一関門突破らしいです。
関連タイピング
-
プレイ回数202長文60秒
-
プレイ回数76英語長文90秒
-
プレイ回数2126英語長文120秒
-
プレイ回数4339英語長文300秒
-
プレイ回数649英語長文220打
-
プレイ回数94357打
-
プレイ回数7846英語長文305打
-
プレイ回数193英語短文30秒
問題文
(package bean;)
package bean;
(import java.sql.SQLException;)
import java.sql.SQLException;
(import java.util.List;)
import java.util.List;
(import java.util.Map;)
import java.util.Map;
(public class LoginBean extends DbConnection {)
public class LoginBean extends DbConnection {
(private String shain_code = "";)
private String shain_code = "";
(private String shain_name = "";)
private String shain_name = "";
(private String password = "";)
private String password = "";
(private List<Map<String,String>> list;)
private List<Map<String,String>> list;
(//getter,setter)
//getter,setter
(public String getShain_code() {)
public String getShain_code() {
(return shain_code;)
return shain_code;
(})
}
(public void setShain_code(String shain_code) {)
public void setShain_code(String shain_code) {
(this.shain_code = shain_code;)
this.shain_code = shain_code;
(})
}
(public String getShain_name() {)
public String getShain_name() {
(return shain_name;)
return shain_name;
(})
}
(public void setShain_name(String shain_name) {)
public void setShain_name(String shain_name) {
(this.shain_name = shain_name;)
this.shain_name = shain_name;
(})
}
(public String getPassword() {)
public String getPassword() {
(return password;)
return password;
(})
}
(public void setPassword(String password) {)
public void setPassword(String password) {
(this.password = password;)
this.password = password;
(})
}
(public List<Map<String, String>> getList() {)
public List<Map<String, String>> getList() {
(return list;)
return list;
(})
}
(public void setList(List<Map<String, String>> list) {)
public void setList(List<Map<String, String>> list) {
(this.list = list;)
this.list = list;
(})
}
(public void setList() {)
public void setList() {
(TorihikisakiBean tb = new TorihikisakiBean();)
TorihikisakiBean tb = new TorihikisakiBean();
(this.list = tb.getTenpoList();)
this.list = tb.getTenpoList();
(})
}
(public boolean check() {)
public boolean check() {
(if(shain_code.length() == 0 || password.length() == 0) {)
if(shain_code.length() == 0 || password.length() == 0) {
(msg = "member code & password";)
msg = "member code & password";
(return false;)
return false;
(})
}
(StringBuilder sql = new StringBuilder();)
StringBuilder sql = new StringBuilder();
(sql.append("select ");)
sql.append("select ");
(sql.append("ms.shain_name,");)
sql.append("ms.shain_name,");
(sql.append("ms.kengen_code,");)
sql.append("ms.kengen_code,");
(sql.append("mk.kengen_name ");)
sql.append("mk.kengen_name ");
(sql.append("from ");)
sql.append("from ");
(sql.append("mst_shain ms join mst_kengen mk ");)
sql.append("mst_shain ms join mst_kengen mk ");
(sql.append("on ms.kengen_code = mk.kengen_code ");)
sql.append("on ms.kengen_code = mk.kengen_code ");
(sql.append("where ms.delete_flg = '0' ");)
sql.append("where ms.delete_flg = '0' ");
(sql.append("and ms.shain_code = ? ");)
sql.append("and ms.shain_code = ? ");
(sql.append("and ms.password = ?");)
sql.append("and ms.password = ?");
(open();)
open();
(try {)
try {
(ps = con.prepareStatement(sql.toString());)
ps = con.prepareStatement(sql.toString());
(ps.setString(1, shain_code);)
ps.setString(1, shain_code);
(ps.setString(2, password);)
ps.setString(2, password);
(rs = ps.executeQuery();)
rs = ps.executeQuery();
(if(rs.next()) {)
if(rs.next()) {
(shain_name = rs.getString("shain_name");)
shain_name = rs.getString("shain_name");
(kengen_code = rs.getString("kengen_code");)
kengen_code = rs.getString("kengen_code");
(kengen_name = rs.getString("kengen_name");)
kengen_name = rs.getString("kengen_name");
(} else {)
} else {
(msg = "member code OR password";)
msg = "member code OR password";
(return false;)
return false;
(})
}
(if(kengen_code.equals("002") && tenpo_code.length() ==0) {)
if(kengen_code.equals("002") && tenpo_code.length() ==0) {
(msg = "select store";)
msg = "select store";
(return false;)
return false;
(})
}
(if(kengen_code.equals("001")) {)
if(kengen_code.equals("001")) {
(tenpo_code = "";)
tenpo_code = "";
(tenpo_name = "secretariat";)
tenpo_name = "secretariat";
(return true;)
return true;
(})
}
(sql = new StringBuilder();)
sql = new StringBuilder();
(sql.append("select torihikisaki_name from mst_torihikisaki where torihikisaki_code = ?");)
sql.append("select torihikisaki_name from mst_torihikisaki where torihikisaki_code = ?");
(ps = con.prepareStatement(sql.toString());)
ps = con.prepareStatement(sql.toString());
(ps.setString(1, tenpo_code);)
ps.setString(1, tenpo_code);
(rs = ps.executeQuery();)
rs = ps.executeQuery();
(if(rs.next()) {)
if(rs.next()) {
(tenpo_name = rs.getString("torihikisaki_name");)
tenpo_name = rs.getString("torihikisaki_name");
(} else {)
} else {
(msg = "please report store";)
msg = "please report store";
(return false;)
return false;
(})
}
(} catch (SQLException e) {)
} catch (SQLException e) {
(e.printStackTrace();)
e.printStackTrace();
(})
}
(return true;)
return true;
(})
}
(})
}