程序有难度和单项练习,但设计了每次只出5到题,如果做错的话会把错题加入到数据库中,然后通多错题巩固选项可以对错题进行训练。

代码:

普通选项代码:

  1. package com.example.szys;
  2.  
  3. import java.math.*;
  4. import java.util.Random;
  5.  
  6. import android.app.Activity;
  7. import android.app.AlertDialog;
  8. import android.content.ContentValues;
  9. import android.content.DialogInterface;
  10. import android.content.Intent;
  11. import android.database.Cursor;
  12. import android.os.Bundle;
  13. import android.view.View;
  14. import android.widget.Button;
  15. import android.widget.EditText;
  16. import android.widget.TextView;
  17.  
  18. public class CalActivity extends Activity {
  19. int op;
  20. int a;
  21. int b;
  22. int n=0;
  23. int w=0;
  24. String r;
  25. Double answer,respon;
  26. TextView textview1,textview2;
  27. EditText editText;
  28. Button button;
  29. @Override
  30. protected void onCreate(Bundle savedInstanceState) {
  31. super.onCreate(savedInstanceState);
  32. setContentView(R.layout.cal_main);
  33. textview1=(TextView)findViewById(R.id.textView1);
  34. textview2=(TextView)findViewById(R.id.textView2);
  35. editText=(EditText)findViewById(R.id.EditText1);
  36. a =new Random().nextInt(100);
  37. b =new Random().nextInt(100);
  38. op=new Random().nextInt(4);
  39. switch(op)
  40. {
  41. case 0:
  42. textview1.setText(a+"+"+b+"=");
  43. answer=(double) (a+b);
  44. break;
  45. case 1:
  46. textview1.setText(a+"-"+b+"=");
  47. answer=(double) (a-b);
  48. break;
  49. case 2:
  50. a =new Random().nextInt(10);
  51. b =new Random().nextInt(10);
  52. textview1.setText(a+"*"+b+"=");
  53. answer=(double) (a*b);
  54. break;
  55. case 3:
  56. a =new Random().nextInt(10);
  57. b =new Random().nextInt(10);
  58. while(b==0){
  59. b =new Random().nextInt(10);
  60. }
  61. textview1.setText(a+"/"+b+"=");
  62. BigDecimal x = new BigDecimal((double)a/b);
  63. answer = x.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
  64.  
  65. break;
  66. }
  67. button=(Button)findViewById(R.id.button4);
  68. button.setOnClickListener(new Button.OnClickListener(){
  69.  
  70. @Override
  71. public void onClick(View arg0) {
  72. // TODO Auto-generated method stub
  73. if(!checkInteger(editText.getText().toString()))
  74. {
  75. AlertDialog.Builder builder = new AlertDialog.Builder(CalActivity.this);
  76. builder.setCancelable(false);
  77. builder.setTitle("错误");
  78. builder.setMessage("你输入的信息有错");
  79. builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
  80.  
  81. public void onClick(DialogInterface dialog, int whichButton) {
  82.  
  83. }
  84. });
  85. builder.create().show();
  86. editText.setText("");
  87. return;
  88. }
  89. respon=Double.parseDouble(editText.getText().toString());
  90. r=textview1.getText().toString();
  91. ContentValues values = new ContentValues();
  92. values.put("problem", r);
  93. values.put("answer", answer);
  94. editText.setText("");
  95. n++;
  96. if(respon.equals(answer))
  97. {
  98. textview2.setText("你答对了!");
  99. }
  100. else{
  101.  
  102. DBHelper helper = new DBHelper(getApplicationContext());
  103. final Cursor c = helper.query();
  104. helper.insert(values);
  105. w++;
  106. textview2.setText("你答错了!\n"+r+answer);
  107. helper.close();
  108. }
  109. if(n<5)
  110. {
  111. a =new Random().nextInt(100);
  112. b =new Random().nextInt(100);
  113. op=new Random().nextInt(4);
  114. switch(op)
  115. {
  116. case 0:
  117. textview1.setText(a+"+"+b+"=");
  118. answer=(double) (a+b);
  119. break;
  120. case 1:
  121. textview1.setText(a+"-"+b+"=");
  122. answer=(double) (a-b);
  123. break;
  124. case 2:
  125. a =new Random().nextInt(10);
  126. b =new Random().nextInt(10);
  127. textview1.setText(a+"*"+b+"=");
  128. answer=(double) (a*b);
  129. break;
  130. case 3:
  131. a =new Random().nextInt(10);
  132. b =new Random().nextInt(10);
  133. while(b==0){
  134. b =new Random().nextInt(10);
  135. }
  136. textview1.setText(a+"/"+b+"=");
  137. BigDecimal x = new BigDecimal((double)a/b);
  138. answer = x.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
  139.  
  140. break;
  141. }
  142. }
  143. else
  144. {
  145. int right=n-w;
  146. double rvate=(double)right/n*100;
  147. AlertDialog.Builder builder = new AlertDialog.Builder(CalActivity.this);
  148. builder.setCancelable(false);
  149. builder.setTitle("结束");
  150. builder.setMessage("你答对了"+right+"题"+"\n"+"答错了"+w+"题"+"\n"+"正确率为"+rvate+"%");
  151. builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
  152.  
  153. public void onClick(DialogInterface dialog, int whichButton) {
  154. Intent intent = new Intent(CalActivity.this, MainActivity.class);
  155. intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
  156. startActivity(intent);
  157. }
  158. });
  159. builder.create().show();
  160. }
  161. }
  162.  
  163. });
  164.  
  165. }
  166. public boolean checkInteger(String text) {
  167. /* 当输入的文本去掉前后空格长度为0时返回false */
  168. if(text.trim().length()==0){
  169. return false;
  170. }
  171. try{
  172. Double.parseDouble(text);
  173. }catch(Exception e){
  174. /* 无法转换为整数时返回false */
  175. return false;
  176. }
  177. return true;
  178. }
  179.  
  180. }

CalActivity

困难选项代码:

  1. package com.example.szys;
  2.  
  3. import java.math.BigDecimal;
  4. import java.util.Random;
  5.  
  6. import android.app.Activity;
  7. import android.app.AlertDialog;
  8. import android.content.ContentValues;
  9. import android.content.DialogInterface;
  10. import android.content.Intent;
  11. import android.database.Cursor;
  12. import android.os.Bundle;
  13. import android.view.View;
  14. import android.widget.Button;
  15. import android.widget.EditText;
  16. import android.widget.TextView;
  17.  
  18. public class CalActivity1 extends Activity{
  19. int op;
  20. int a;
  21. int b;
  22. int c;
  23. int d;
  24. int n=0;
  25. int w=0;
  26. String r;
  27. Double answer,respon;
  28. TextView textview1,textview2;
  29. EditText editText;
  30. Button button;
  31. @Override
  32. protected void onCreate(Bundle savedInstanceState) {
  33. super.onCreate(savedInstanceState);
  34. setContentView(R.layout.cal_main);
  35. textview1=(TextView)findViewById(R.id.textView1);
  36. textview2=(TextView)findViewById(R.id.textView2);
  37. editText=(EditText)findViewById(R.id.EditText1);
  38. a =new Random().nextInt(100);
  39. b =new Random().nextInt(10);
  40. c =new Random().nextInt(100);
  41. d =new Random().nextInt(10);
  42. op=new Random().nextInt(4);
  43. switch(op)
  44. {
  45. case 0:
  46. while(d==0){
  47. d =new Random().nextInt(10);
  48. }
  49. textview1.setText("("+a+"+"+b+")"+"/"+d+"=");
  50. BigDecimal x = new BigDecimal((double) (a+b)/d);
  51. answer = x.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
  52. break;
  53. case 1:
  54. textview1.setText(d+"*"+a+"-"+b+"=");
  55. answer=(double) (d*a-b);
  56. break;
  57. case 2:
  58. textview1.setText(a+"*"+b+"+"+c+"=");
  59. answer=(double) (a*b+c);
  60. break;
  61. case 3:
  62. while(c==0){
  63. c =new Random().nextInt(100);
  64. }
  65. textview1.setText(a+"/"+c+"=");
  66. BigDecimal y = new BigDecimal((double)a/c);
  67. answer = y.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
  68.  
  69. break;
  70. }
  71. button=(Button)findViewById(R.id.button4);
  72. button.setOnClickListener(new Button.OnClickListener(){
  73.  
  74. @Override
  75. public void onClick(View arg0) {
  76. // TODO Auto-generated method stub
  77. if(!checkInteger(editText.getText().toString()))
  78. {
  79. AlertDialog.Builder builder = new AlertDialog.Builder(CalActivity1.this);
  80. builder.setCancelable(false);
  81. builder.setTitle("错误");
  82. builder.setMessage("你输入的信息有错");
  83. builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
  84.  
  85. public void onClick(DialogInterface dialog, int whichButton) {
  86.  
  87. }
  88. });
  89. builder.create().show();
  90. editText.setText("");
  91. return;
  92. }
  93. respon=Double.parseDouble(editText.getText().toString());
  94. r=textview1.getText().toString();
  95. ContentValues values = new ContentValues();
  96. values.put("problem", r);
  97. values.put("answer", answer);
  98. editText.setText("");
  99. n++;
  100. if(respon.equals(answer))
  101. {
  102. textview2.setText("你答对了!");
  103. }
  104. else{
  105. DBHelper helper = new DBHelper(getApplicationContext());
  106. final Cursor c = helper.query();
  107. helper.insert(values);
  108. w++;
  109. textview2.setText("你答错了!\n"+r+answer);
  110. helper.close();
  111. }
  112. if(n<5)
  113. {
  114. a =new Random().nextInt(100);
  115. b =new Random().nextInt(100);
  116. op=new Random().nextInt(4);
  117. switch(op)
  118. {
  119. case 0:
  120. while(d==0){
  121. d =new Random().nextInt(10);
  122. }
  123. textview1.setText("("+a+"+"+b+")"+"/"+d+"=");
  124. BigDecimal x = new BigDecimal((double) (a+b)/d);
  125. answer = x.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
  126. break;
  127. case 1:
  128. textview1.setText(d+"*"+a+"-"+b+"=");
  129. answer=(double) (d*a-b);
  130. break;
  131. case 2:
  132. textview1.setText(a+"*"+b+"+"+c+"=");
  133. answer=(double) (a*b+c);
  134. break;
  135. case 3:
  136. while(c==0){
  137. c =new Random().nextInt(100);
  138. }
  139. textview1.setText(a+"/"+c+"=");
  140. BigDecimal y = new BigDecimal((double)a/c);
  141. answer = y.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
  142.  
  143. break;
  144. }
  145. }
  146. else
  147. {
  148. int right=n-w;
  149. double rvate=(double)right/n*100;
  150. AlertDialog.Builder builder = new AlertDialog.Builder(CalActivity1.this);
  151. builder.setCancelable(false);
  152. builder.setTitle("结束");
  153. builder.setMessage("你答对了"+right+"题"+"\n"+"答错了"+w+"题"+"\n"+"正确率为"+rvate+"%");
  154. builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
  155.  
  156. public void onClick(DialogInterface dialog, int whichButton) {
  157. Intent intent = new Intent(CalActivity1.this, MainActivity.class);
  158. intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
  159. startActivity(intent);
  160. }
  161. });
  162. builder.create().show();
  163. }
  164. }
  165.  
  166. });
  167.  
  168. }
  169. public boolean checkInteger(String text) {
  170. /* 当输入的文本去掉前后空格长度为0时返回false */
  171. if(text.trim().length()==0){
  172. return false;
  173. }
  174. try{
  175. Double.parseDouble(text);
  176. }catch(Exception e){
  177. /* 无法转换为整数时返回false */
  178. return false;
  179. }
  180. return true;
  181. }
  182. }

CalActivity1

加法练习代码:

  1. package com.example.szys;
  2.  
  3. import java.math.*;
  4. import java.util.Random;
  5.  
  6. import android.app.Activity;
  7. import android.app.AlertDialog;
  8. import android.content.ContentValues;
  9. import android.content.DialogInterface;
  10. import android.content.Intent;
  11. import android.database.Cursor;
  12. import android.os.Bundle;
  13. import android.view.View;
  14. import android.widget.Button;
  15. import android.widget.EditText;
  16. import android.widget.TextView;
  17.  
  18. public class CalActivity2 extends Activity {
  19. int a;
  20. int b;
  21. int n=0;
  22. int w=0;
  23. String r;
  24. Double answer,respon;
  25. TextView textview1,textview2;
  26. EditText editText;
  27. Button button;
  28. @Override
  29. protected void onCreate(Bundle savedInstanceState) {
  30. super.onCreate(savedInstanceState);
  31. setContentView(R.layout.cal_main);
  32. textview1=(TextView)findViewById(R.id.textView1);
  33. textview2=(TextView)findViewById(R.id.textView2);
  34. editText=(EditText)findViewById(R.id.EditText1);
  35. a =new Random().nextInt(100);
  36. b =new Random().nextInt(100);
  37.  
  38. textview1.setText(a+"+"+b+"=");
  39. answer=(double) (a+b);
  40.  
  41. button=(Button)findViewById(R.id.button4);
  42. button.setOnClickListener(new Button.OnClickListener(){
  43.  
  44. @Override
  45. public void onClick(View arg0) {
  46. // TODO Auto-generated method stub
  47. if(!checkInteger(editText.getText().toString()))
  48. {
  49. AlertDialog.Builder builder = new AlertDialog.Builder(CalActivity2.this);
  50. builder.setCancelable(false);
  51. builder.setTitle("错误");
  52. builder.setMessage("你输入的信息有错");
  53. builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
  54.  
  55. public void onClick(DialogInterface dialog, int whichButton) {
  56.  
  57. }
  58. });
  59. builder.create().show();
  60. editText.setText("");
  61. return;
  62. }
  63. respon=Double.parseDouble(editText.getText().toString());
  64. r=textview1.getText().toString();
  65. ContentValues values = new ContentValues();
  66. values.put("problem", r);
  67. values.put("answer", answer);
  68. editText.setText("");
  69. n++;
  70. if(respon.equals(answer))
  71. {
  72. textview2.setText("你答对了!");
  73. }
  74. else{
  75. DBHelper helper = new DBHelper(getApplicationContext());
  76. final Cursor c = helper.query();
  77. helper.insert(values);
  78. w++;
  79. textview2.setText("你答错了!\n"+r+answer);
  80. helper.close();
  81. }
  82. if(n<5)
  83. {
  84. a =new Random().nextInt(100);
  85. b =new Random().nextInt(100);
  86.  
  87. textview1.setText(a+"+"+b+"=");
  88. answer=(double) (a+b);
  89.  
  90. }
  91. else
  92. {
  93. int right=n-w;
  94. double rvate=(double)right/n*100;
  95. AlertDialog.Builder builder = new AlertDialog.Builder(CalActivity2.this);
  96. builder.setCancelable(false);
  97. builder.setTitle("结束");
  98. builder.setMessage("你答对了"+right+"题"+"\n"+"答错了"+w+"题"+"\n"+"正确率为"+rvate+"%");
  99. builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
  100.  
  101. public void onClick(DialogInterface dialog, int whichButton) {
  102. Intent intent = new Intent(CalActivity2.this, MainActivity.class);
  103. intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
  104. startActivity(intent);
  105. }
  106. });
  107. builder.create().show();
  108. }
  109. }
  110.  
  111. });
  112.  
  113. }
  114. public boolean checkInteger(String text) {
  115. /* 当输入的文本去掉前后空格长度为0时返回false */
  116. if(text.trim().length()==0){
  117. return false;
  118. }
  119. try{
  120. Double.parseDouble(text);
  121. }catch(Exception e){
  122. /* 无法转换为整数时返回false */
  123. return false;
  124. }
  125. return true;
  126. }
  127. }

CalActivity2

减法练习代码:

  1. package com.example.szys;
  2.  
  3. import java.math.*;
  4. import java.util.Random;
  5.  
  6. import android.app.Activity;
  7. import android.app.AlertDialog;
  8. import android.content.ContentValues;
  9. import android.content.DialogInterface;
  10. import android.content.Intent;
  11. import android.database.Cursor;
  12. import android.os.Bundle;
  13. import android.view.View;
  14. import android.widget.Button;
  15. import android.widget.EditText;
  16. import android.widget.TextView;
  17.  
  18. public class CalActivity3 extends Activity {
  19.  
  20. int a;
  21. int b;
  22. int n=0;
  23. int w=0;
  24. String r;
  25. Double answer,respon;
  26. TextView textview1,textview2;
  27. EditText editText;
  28. Button button;
  29. @Override
  30. protected void onCreate(Bundle savedInstanceState) {
  31. super.onCreate(savedInstanceState);
  32. setContentView(R.layout.cal_main);
  33. textview1=(TextView)findViewById(R.id.textView1);
  34. textview2=(TextView)findViewById(R.id.textView2);
  35. editText=(EditText)findViewById(R.id.EditText1);
  36. a =new Random().nextInt(100);
  37. b =new Random().nextInt(100);
  38.  
  39. textview1.setText(a+"-"+b+"=");
  40. answer=(double) (a-b);
  41.  
  42. button=(Button)findViewById(R.id.button4);
  43. button.setOnClickListener(new Button.OnClickListener(){
  44.  
  45. @Override
  46. public void onClick(View arg0) {
  47. // TODO Auto-generated method stub
  48. if(!checkInteger(editText.getText().toString()))
  49. {
  50. AlertDialog.Builder builder = new AlertDialog.Builder(CalActivity3.this);
  51. builder.setCancelable(false);
  52. builder.setTitle("错误");
  53. builder.setMessage("你输入的信息有错");
  54. builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
  55.  
  56. public void onClick(DialogInterface dialog, int whichButton) {
  57.  
  58. }
  59. });
  60. builder.create().show();
  61. editText.setText("");
  62. return;
  63. }
  64. respon=Double.parseDouble(editText.getText().toString());
  65. r=textview1.getText().toString();
  66. ContentValues values = new ContentValues();
  67. values.put("problem", r);
  68. values.put("answer", answer);
  69. editText.setText("");
  70. n++;
  71. if(respon.equals(answer))
  72. {
  73. textview2.setText("你答对了!");
  74. }
  75. else{
  76. DBHelper helper = new DBHelper(getApplicationContext());
  77. final Cursor c = helper.query();
  78. helper.insert(values);
  79. w++;
  80. textview2.setText("你答错了!\n"+r+answer);
  81. helper.close();
  82. }
  83. if(n<5)
  84. {
  85. a =new Random().nextInt(100);
  86. b =new Random().nextInt(100);
  87.  
  88. textview1.setText(a+"-"+b+"=");
  89. answer=(double) (a-b);
  90. }
  91. else
  92. {
  93. int right=n-w;
  94. double rvate=(double)right/n*100;
  95. AlertDialog.Builder builder = new AlertDialog.Builder(CalActivity3.this);
  96. builder.setCancelable(false);
  97. builder.setTitle("结束");
  98. builder.setMessage("你答对了"+right+"题"+"\n"+"答错了"+w+"题"+"\n"+"正确率为"+rvate+"%");
  99. builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
  100.  
  101. public void onClick(DialogInterface dialog, int whichButton) {
  102. Intent intent = new Intent(CalActivity3.this, MainActivity.class);
  103. intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
  104. startActivity(intent);
  105. }
  106. });
  107. builder.create().show();
  108. }
  109. }
  110.  
  111. });
  112.  
  113. }
  114. public boolean checkInteger(String text) {
  115. /* 当输入的文本去掉前后空格长度为0时返回false */
  116. if(text.trim().length()==0){
  117. return false;
  118. }
  119. try{
  120. Double.parseDouble(text);
  121. }catch(Exception e){
  122. /* 无法转换为整数时返回false */
  123. return false;
  124. }
  125. return true;
  126. }
  127. }

CalActivity3

乘法练习代码:

  1. package com.example.szys;
  2.  
  3. import java.math.*;
  4. import java.util.Random;
  5.  
  6. import android.app.Activity;
  7. import android.app.AlertDialog;
  8. import android.content.ContentValues;
  9. import android.content.DialogInterface;
  10. import android.content.Intent;
  11. import android.database.Cursor;
  12. import android.os.Bundle;
  13. import android.view.View;
  14. import android.widget.Button;
  15. import android.widget.EditText;
  16. import android.widget.TextView;
  17.  
  18. public class CalActivity4 extends Activity {
  19.  
  20. int a;
  21. int b;
  22. int n=0;
  23. int w=0;
  24. String r;
  25. Double answer,respon;
  26. TextView textview1,textview2;
  27. EditText editText;
  28. Button button;
  29. @Override
  30. protected void onCreate(Bundle savedInstanceState) {
  31. super.onCreate(savedInstanceState);
  32. setContentView(R.layout.cal_main);
  33. textview1=(TextView)findViewById(R.id.textView1);
  34. textview2=(TextView)findViewById(R.id.textView2);
  35. editText=(EditText)findViewById(R.id.EditText1);
  36. a =new Random().nextInt(100);
  37. b =new Random().nextInt(100);
  38.  
  39. textview1.setText(a+"*"+b+"=");
  40. answer=(double) (a*b);
  41.  
  42. button=(Button)findViewById(R.id.button4);
  43. button.setOnClickListener(new Button.OnClickListener(){
  44.  
  45. @Override
  46. public void onClick(View arg0) {
  47. // TODO Auto-generated method stub
  48. if(!checkInteger(editText.getText().toString()))
  49. {
  50. AlertDialog.Builder builder = new AlertDialog.Builder(CalActivity4.this);
  51. builder.setCancelable(false);
  52. builder.setTitle("错误");
  53. builder.setMessage("你输入的信息有错");
  54. builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
  55.  
  56. public void onClick(DialogInterface dialog, int whichButton) {
  57.  
  58. }
  59. });
  60. builder.create().show();
  61. editText.setText("");
  62. return;
  63. }
  64. respon=Double.parseDouble(editText.getText().toString());
  65. r=textview1.getText().toString();
  66. ContentValues values = new ContentValues();
  67. values.put("problem", r);
  68. values.put("answer", answer);
  69. editText.setText("");
  70. n++;
  71. if(respon.equals(answer))
  72. {
  73. textview2.setText("你答对了!");
  74. }
  75. else{
  76. DBHelper helper = new DBHelper(getApplicationContext());
  77. final Cursor c = helper.query();
  78. helper.insert(values);
  79. w++;
  80. textview2.setText("你答错了!\n"+r+answer);
  81. helper.close();
  82. }
  83. if(n<5)
  84. {
  85. a =new Random().nextInt(100);
  86. b =new Random().nextInt(100);
  87.  
  88. textview1.setText(a+"*"+b+"=");
  89. answer=(double) (a*b);
  90.  
  91. }
  92. else
  93. {
  94. int right=n-w;
  95. double rvate=(double)right/n*100;
  96. AlertDialog.Builder builder = new AlertDialog.Builder(CalActivity4.this);
  97. builder.setCancelable(false);
  98. builder.setTitle("结束");
  99. builder.setMessage("你答对了"+right+"题"+"\n"+"答错了"+w+"题"+"\n"+"正确率为"+rvate+"%");
  100. builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
  101.  
  102. public void onClick(DialogInterface dialog, int whichButton) {
  103. Intent intent = new Intent(CalActivity4.this, MainActivity.class);
  104. intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
  105. startActivity(intent);
  106. }
  107. });
  108. builder.create().show();
  109. }
  110. }
  111.  
  112. });
  113.  
  114. }
  115. public boolean checkInteger(String text) {
  116. /* 当输入的文本去掉前后空格长度为0时返回false */
  117. if(text.trim().length()==0){
  118. return false;
  119. }
  120. try{
  121. Double.parseDouble(text);
  122. }catch(Exception e){
  123. /* 无法转换为整数时返回false */
  124. return false;
  125. }
  126. return true;
  127. }
  128. }

CalActivity4

除法练习代码:

  1. package com.example.szys;
  2.  
  3. import java.math.*;
  4. import java.util.Random;
  5.  
  6. import android.app.Activity;
  7. import android.app.AlertDialog;
  8. import android.content.ContentValues;
  9. import android.content.DialogInterface;
  10. import android.content.Intent;
  11. import android.database.Cursor;
  12. import android.os.Bundle;
  13. import android.view.View;
  14. import android.widget.Button;
  15. import android.widget.EditText;
  16. import android.widget.TextView;
  17.  
  18. public class CalActivity5 extends Activity {
  19.  
  20. int a;
  21. int b;
  22. int n=0;
  23. int w=0;
  24. String r;
  25. Double answer,respon;
  26. TextView textview1,textview2;
  27. EditText editText;
  28. Button button;
  29. @Override
  30. protected void onCreate(Bundle savedInstanceState) {
  31. super.onCreate(savedInstanceState);
  32. setContentView(R.layout.cal_main);
  33. textview1=(TextView)findViewById(R.id.textView1);
  34. textview2=(TextView)findViewById(R.id.textView2);
  35. editText=(EditText)findViewById(R.id.EditText1);
  36. a =new Random().nextInt(100);
  37. b =new Random().nextInt(100);
  38.  
  39. while(b==0){
  40. b =new Random().nextInt(100);
  41. }
  42. textview1.setText(a+"/"+b+"=");
  43. BigDecimal x = new BigDecimal((double)a/b);
  44. answer = x.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
  45.  
  46. button=(Button)findViewById(R.id.button4);
  47. button.setOnClickListener(new Button.OnClickListener(){
  48.  
  49. @Override
  50. public void onClick(View arg0) {
  51. // TODO Auto-generated method stub
  52. if(!checkInteger(editText.getText().toString()))
  53. {
  54. AlertDialog.Builder builder = new AlertDialog.Builder(CalActivity5.this);
  55. builder.setCancelable(false);
  56. builder.setTitle("错误");
  57. builder.setMessage("你输入的信息有错");
  58. builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
  59.  
  60. public void onClick(DialogInterface dialog, int whichButton) {
  61.  
  62. }
  63. });
  64. builder.create().show();
  65. editText.setText("");
  66. return;
  67. }
  68. respon=Double.parseDouble(editText.getText().toString());
  69. r=textview1.getText().toString();
  70. ContentValues values = new ContentValues();
  71. values.put("problem", r);
  72. values.put("answer", answer);
  73. editText.setText("");
  74. n++;
  75. if(respon.equals(answer))
  76. {
  77. textview2.setText("你答对了!");
  78. }
  79. else{
  80. DBHelper helper = new DBHelper(getApplicationContext());
  81. final Cursor c = helper.query();
  82. helper.insert(values);
  83. w++;
  84. textview2.setText("你答错了!\n"+r+answer);
  85. helper.close();
  86. }
  87. if(n<5)
  88. {
  89. a =new Random().nextInt(100);
  90. b =new Random().nextInt(100);
  91.  
  92. while(b==0){
  93. b =new Random().nextInt(100);
  94. }
  95. textview1.setText(a+"/"+b+"=");
  96. BigDecimal x = new BigDecimal((double)a/b);
  97. answer = x.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
  98.  
  99. }
  100. else
  101. {
  102. int right=n-w;
  103. double rvate=(double)right/n*100;
  104. AlertDialog.Builder builder = new AlertDialog.Builder(CalActivity5.this);
  105. builder.setCancelable(false);
  106. builder.setTitle("结束");
  107. builder.setMessage("你答对了"+right+"题"+"\n"+"答错了"+w+"题"+"\n"+"正确率为"+rvate+"%");
  108. builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
  109.  
  110. public void onClick(DialogInterface dialog, int whichButton) {
  111. Intent intent = new Intent(CalActivity5.this, MainActivity.class);
  112. intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
  113. startActivity(intent);
  114. }
  115. });
  116. builder.create().show();
  117. }
  118. }
  119.  
  120. });
  121.  
  122. }
  123. public boolean checkInteger(String text) {
  124. /* 当输入的文本去掉前后空格长度为0时返回false */
  125. if(text.trim().length()==0){
  126. return false;
  127. }
  128. try{
  129. Double.parseDouble(text);
  130. }catch(Exception e){
  131. /* 无法转换为整数时返回false */
  132. return false;
  133. }
  134. return true;
  135. }
  136. }

CalActivity5

主页面代码:

  1. package com.example.szys;
  2.  
  3. import android.app.Activity;
  4. import android.app.AlertDialog;
  5. import android.content.DialogInterface;
  6. import android.content.Intent;
  7. import android.database.Cursor;
  8. import android.os.Bundle;
  9. import android.view.View;
  10. import android.widget.Button;
  11.  
  12. public class MainActivity extends Activity {
  13.  
  14. Button start,end,wa;
  15. int yourChose=-1;
  16.  
  17. private void showSinChosDia()
  18. {
  19. final String[] mList={"普通","困难","加法练习","减法练习","乘法练习","除法练习"};
  20. yourChose=-1;
  21. AlertDialog.Builder sinChosDia=new AlertDialog.Builder(MainActivity.this);
  22. sinChosDia.setTitle("难度/单项练习");
  23. sinChosDia.setSingleChoiceItems(mList, 0, new DialogInterface.OnClickListener() {
  24.  
  25. @Override
  26. public void onClick(DialogInterface dialog, int which) {
  27. // TODO Auto-generated method stub
  28. yourChose=which;
  29.  
  30. }
  31. });
  32. sinChosDia.setPositiveButton("确定", new DialogInterface.OnClickListener() {
  33.  
  34. @Override
  35. public void onClick(DialogInterface dialog, int which) {
  36. // TODO Auto-generated method stub
  37.  
  38. if(yourChose==0)
  39. {
  40. Intent intent = new Intent(MainActivity.this, CalActivity.class);
  41. startActivity(intent);
  42. }
  43. if(yourChose==1)
  44. {
  45. Intent intent = new Intent(MainActivity.this, CalActivity1.class);
  46. startActivity(intent);
  47. }
  48. if(yourChose==2)
  49. {
  50. Intent intent = new Intent(MainActivity.this, CalActivity2.class);
  51. startActivity(intent);
  52. }
  53. if(yourChose==3)
  54. {
  55. Intent intent = new Intent(MainActivity.this, CalActivity3.class);
  56. startActivity(intent);
  57. }
  58. if(yourChose==4)
  59. {
  60. Intent intent = new Intent(MainActivity.this, CalActivity4.class);
  61. startActivity(intent);
  62. }
  63. if(yourChose==5)
  64. {
  65. Intent intent = new Intent(MainActivity.this, CalActivity5.class);
  66. startActivity(intent);
  67. }
  68. }
  69. });
  70. sinChosDia.create().show();
  71. }
  72.  
  73. @Override
  74.  
  75. protected void onCreate(Bundle savedInstanceState) {
  76. super.onCreate(savedInstanceState);
  77. setContentView(R.layout.activity_main);
  78. final DBHelper helper = new DBHelper(this);
  79. final Cursor c = helper.query();
  80. start=(Button) findViewById(R.id.button1);
  81. start.setOnClickListener(new Button.OnClickListener(){
  82.  
  83. @Override
  84.  
  85. public void onClick(View v) {
  86. // TODO Auto-generated method stub
  87.  
  88. showSinChosDia();
  89.  
  90. }
  91. });
  92. wa=(Button) findViewById(R.id.button2);
  93. wa.setOnClickListener(new Button.OnClickListener(){
  94.  
  95. @Override
  96. public void onClick(View v) {
  97. // TODO Auto-generated method stub
  98. if(!c.moveToNext())
  99. {
  100. helper.close();
  101. AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
  102. builder.setCancelable(false);
  103. builder.setTitle("结束");
  104. builder.setMessage("无错题");
  105. builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
  106.  
  107. public void onClick(DialogInterface dialog, int whichButton) {
  108. }
  109. });
  110. builder.create().show();
  111. }
  112. else{
  113. Intent intent = new Intent(MainActivity.this, ShowDB.class);
  114. startActivity(intent);
  115. }
  116. }
  117. });
  118. end=(Button) findViewById(R.id.button3);
  119. end.setOnClickListener(new Button.OnClickListener(){
  120.  
  121. @Override
  122. public void onClick(View v) {
  123. // TODO Auto-generated method stub
  124. System.exit(0);
  125. }
  126. });
  127. }
  128.  
  129. }

MainActivity

数据库代码:

  1. package com.example.szys;
  2.  
  3. import android.content.ContentValues;
  4. import android.content.Context;
  5. import android.database.Cursor;
  6. import android.database.sqlite.SQLiteDatabase;
  7. import android.database.sqlite.SQLiteOpenHelper;
  8. public class DBHelper extends SQLiteOpenHelper {
  9. private static final String DB_NAME = "coll.db";
  10. private static final String TBL_NAME = "CollTbl";
  11. private static final String CREATE_TBL = " create table "
  12. + " CollTbl(_id integer primary key autoincrement,problem text,answer text) ";
  13.  
  14. private SQLiteDatabase db;
  15. DBHelper(Context c) {
  16. super(c, DB_NAME, null, 2);
  17. }
  18. @Override
  19. public void onCreate(SQLiteDatabase db) {
  20. this.db = db;
  21. db.execSQL(CREATE_TBL);
  22. }
  23. public void insert(ContentValues values) {
  24. SQLiteDatabase db = getWritableDatabase();
  25. db.insert(TBL_NAME, null, values);
  26. db.close();
  27. }
  28. public Cursor query() {
  29. SQLiteDatabase db = getWritableDatabase();
  30. Cursor c = db.query(TBL_NAME, null, null, null, null, null, null);
  31. return c;
  32. }
  33. public void del(int id) {
  34. if (db == null)
  35. db = getWritableDatabase();
  36. db.delete(TBL_NAME, "_id=?", new String[] { String.valueOf(id) });
  37. }
  38. public void close() {
  39. if (db != null)
  40. db.close();
  41. }
  42. @Override
  43. public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
  44. }
  45. }

DBHelper

错题巩固代码:

  1. package com.example.szys;
  2.  
  3. import java.math.BigDecimal;
  4. import java.util.Random;
  5.  
  6. import android.app.Activity;
  7. import android.app.AlertDialog;
  8. import android.content.ContentValues;
  9. import android.content.DialogInterface;
  10. import android.content.Intent;
  11. import android.database.Cursor;
  12. import android.database.sqlite.SQLiteDatabase;
  13. import android.os.Bundle;
  14. import android.view.View;
  15. import android.widget.Button;
  16. import android.widget.EditText;
  17. import android.widget.TextView;
  18.  
  19. public class ShowDB extends Activity {
  20. int op;
  21. int a;
  22. int b;
  23. int n=0;
  24. int w=0;
  25. String r;
  26. Double respon,answer;
  27. String problem;
  28. TextView textview1,textview2;
  29. EditText editText;
  30. Button button,button1,button2,button3;
  31. @Override
  32. protected void onCreate(Bundle savedInstanceState) {
  33. super.onCreate(savedInstanceState);
  34. setContentView(R.layout.show_maiin);
  35. textview1=(TextView)findViewById(R.id.textView1);
  36. textview2=(TextView)findViewById(R.id.textView2);
  37. editText=(EditText)findViewById(R.id.EditText1);
  38. final DBHelper helper = new DBHelper(this);
  39. final Cursor c = helper.query();
  40. c.moveToNext();
  41. problem = c.getString(c.getColumnIndex("problem"));
  42. answer = Double.parseDouble(c.getString(c.getColumnIndex("answer")));
  43. textview1.setText(problem);
  44. button=(Button)findViewById(R.id.button6);
  45. button.setOnClickListener(new Button.OnClickListener(){
  46.  
  47. @Override
  48. public void onClick(View arg0) {
  49. // TODO Auto-generated method stub
  50. if(!checkInteger(editText.getText().toString()))
  51. {
  52. AlertDialog.Builder builder = new AlertDialog.Builder(ShowDB.this);
  53. builder.setCancelable(false);
  54. builder.setTitle("错误");
  55. builder.setMessage("你输入的信息有错");
  56. builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
  57.  
  58. public void onClick(DialogInterface dialog, int whichButton) {
  59.  
  60. }
  61. });
  62. builder.create().show();
  63. editText.setText("");
  64. return;
  65. }
  66. respon=Double.parseDouble(editText.getText().toString());
  67. if(respon.equals(answer))
  68. {
  69. textview2.setText("你答对了!");
  70. editText.setText("");
  71. }
  72. else{
  73. w++;
  74. textview2.setText("你答错了!\n"+problem+answer);
  75. editText.setText("");
  76. }
  77. if(!c.moveToNext())
  78. {
  79. AlertDialog.Builder builder = new AlertDialog.Builder(ShowDB.this);
  80. builder.setCancelable(false);
  81. builder.setTitle("结束");
  82. builder.setMessage("");
  83. builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
  84.  
  85. public void onClick(DialogInterface dialog, int whichButton) {
  86. Intent intent = new Intent(ShowDB.this, MainActivity.class);
  87. intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
  88. startActivity(intent);
  89. }
  90. });
  91. builder.create().show();
  92. }
  93. }
  94.  
  95. });
  96. button1=(Button)findViewById(R.id.button7);
  97. button1.setOnClickListener(new Button.OnClickListener(){
  98.  
  99. @Override
  100. public void onClick(View arg0) {
  101. // TODO Auto-generated method stub
  102.  
  103. if(c.moveToNext())
  104. {
  105. editText.setText("");
  106. problem = c.getString(c.getColumnIndex("problem"));
  107. answer = Double.parseDouble(c.getString(c.getColumnIndex("answer")));
  108. textview1.setText(problem);
  109. }
  110. }
  111.  
  112. });
  113. button2=(Button)findViewById(R.id.button8);
  114. button2.setOnClickListener(new Button.OnClickListener(){
  115.  
  116. @Override
  117. public void onClick(View arg0) {
  118. // TODO Auto-generated method stub
  119. helper.del(c.getInt(0));
  120. AlertDialog.Builder builder = new AlertDialog.Builder(ShowDB.this);
  121. builder.setCancelable(false);
  122. builder.setTitle("提示");
  123. builder.setMessage("删除成功");
  124. builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
  125.  
  126. public void onClick(DialogInterface dialog, int whichButton) {
  127. if(c.moveToNext())
  128. {
  129. editText.setText("");
  130. problem = c.getString(c.getColumnIndex("problem"));
  131. answer = Double.parseDouble(c.getString(c.getColumnIndex("answer")));
  132. textview1.setText(problem);
  133. }
  134. else if(!c.moveToNext())
  135. {
  136. textview1.setText("");
  137. AlertDialog.Builder builder = new AlertDialog.Builder(ShowDB.this);
  138. builder.setCancelable(false);
  139. builder.setTitle("结束");
  140. builder.setMessage("已无错题");
  141. builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
  142.  
  143. public void onClick(DialogInterface dialog, int whichButton) {
  144. Intent intent = new Intent(ShowDB.this, MainActivity.class);
  145. intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
  146. startActivity(intent);
  147. }
  148. });
  149. builder.create().show();
  150. }
  151. }
  152. });
  153. builder.create().show();
  154. }
  155.  
  156. });
  157. button3=(Button)findViewById(R.id.button9);
  158. button3.setOnClickListener(new Button.OnClickListener(){
  159.  
  160. @Override
  161. public void onClick(View arg0) {
  162. // TODO Auto-generated method stub
  163.  
  164. Intent intent = new Intent(ShowDB.this, MainActivity.class);
  165. intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
  166. startActivity(intent);
  167. }
  168.  
  169. });
  170.  
  171. }
  172. public boolean checkInteger(String text) {
  173. /* 当输入的文本去掉前后空格长度为0时返回false */
  174. if(text.trim().length()==0){
  175. return false;
  176. }
  177. try{
  178. Double.parseDouble(text);
  179. }catch(Exception e){
  180. /* 无法转换为整数时返回false */
  181. return false;
  182. }
  183. return true;
  184. }
  185.  
  186. }

ShowDB

XML代码

  1. <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2. xmlns:tools="http://schemas.android.com/tools"
  3. android:id="@+id/container"
  4. android:layout_width="match_parent"
  5. android:layout_height="match_parent"
  6. android:orientation="vertical"
  7. android:background="@drawable/bg1">
  8.  
  9. <LinearLayout
  10. android:layout_width="fill_parent"
  11. android:layout_height="wrap_content"
  12. android:orientation="vertical"
  13. android:layout_gravity="center">
  14.  
  15. <Button
  16. android:id="@+id/button1"
  17. android:layout_width="fill_parent"
  18. android:layout_height="wrap_content"
  19. android:text="开始" />
  20.  
  21. <Button
  22. android:id="@+id/button2"
  23. android:layout_width="fill_parent"
  24. android:layout_height="wrap_content"
  25. android:text="错题巩固" />
  26.  
  27. <Button
  28. android:id="@+id/button3"
  29. android:layout_width="fill_parent"
  30. android:layout_height="wrap_content"
  31. android:text="退出" />
  32.  
  33. </LinearLayout>
  34.  
  35. </FrameLayout>

activity_main

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent"
  5. android:orientation="vertical"
  6. android:background="@drawable/bg1">
  7.  
  8. <LinearLayout
  9. android:layout_width="fill_parent"
  10. android:layout_height="wrap_content"
  11. android:orientation="vertical"
  12. android:layout_gravity="center">
  13.  
  14. <LinearLayout
  15. android:layout_width="match_parent"
  16. android:layout_height="wrap_content"
  17. android:layout_gravity="center" >
  18.  
  19. <TextView
  20. android:id="@+id/textView1"
  21. android:layout_width="93dp"
  22. android:layout_height="wrap_content"
  23. android:editable="true"
  24. android:text="" />
  25.  
  26. <EditText
  27. android:id="@+id/EditText1"
  28. android:layout_width="wrap_content"
  29. android:layout_height="wrap_content"
  30. android:digits="1234567890.-"
  31. android:ems="10"
  32. android:numeric="decimal"
  33. android:text="" >
  34.  
  35. <requestFocus />
  36. </EditText>
  37. </LinearLayout>
  38.  
  39. <Button
  40. android:id="@+id/button4"
  41. android:layout_width="match_parent"
  42. android:layout_height="wrap_content"
  43. android:text="确定" />
  44.  
  45. <TextView
  46. android:id="@+id/textView2"
  47. android:layout_width="match_parent"
  48. android:layout_height="70dp"
  49. android:editable="true"
  50. android:text="" />
  51.  
  52. </LinearLayout>
  53.  
  54. </LinearLayout>

cal_main

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent"
  5. android:orientation="vertical"
  6. android:background="@drawable/bg1">
  7.  
  8. <LinearLayout
  9. android:layout_width="fill_parent"
  10. android:layout_height="wrap_content"
  11. android:orientation="vertical"
  12. android:layout_gravity="center">
  13.  
  14. <LinearLayout
  15. android:layout_width="match_parent"
  16. android:layout_height="wrap_content"
  17. android:layout_gravity="center" >
  18.  
  19. <TextView
  20. android:id="@+id/textView1"
  21. android:layout_width="93dp"
  22. android:layout_height="wrap_content"
  23. android:editable="true"
  24. android:text="" />
  25.  
  26. <EditText
  27. android:id="@+id/EditText1"
  28. android:layout_width="wrap_content"
  29. android:layout_height="wrap_content"
  30. android:digits="1234567890.-"
  31. android:ems="10"
  32. android:numeric="decimal"
  33. android:text="" >
  34.  
  35. <requestFocus />
  36. </EditText>
  37. </LinearLayout>
  38.  
  39. <Button
  40. android:id="@+id/button6"
  41. android:layout_width="match_parent"
  42. android:layout_height="wrap_content"
  43. android:text="确定" />
  44. <Button
  45. android:id="@+id/button7"
  46. android:layout_width="match_parent"
  47. android:layout_height="wrap_content"
  48. android:text="下一题" />
  49. <Button
  50. android:id="@+id/button8"
  51. android:layout_width="match_parent"
  52. android:layout_height="wrap_content"
  53. android:text="从错题库删除" />
  54. <Button
  55. android:id="@+id/button9"
  56. android:layout_width="match_parent"
  57. android:layout_height="wrap_content"
  58. android:text="返回" />
  59.  
  60. <TextView
  61. android:id="@+id/textView2"
  62. android:layout_width="match_parent"
  63. android:layout_height="70dp"
  64. android:editable="true"
  65. android:text="" />
  66.  
  67. </LinearLayout>
  68.  
  69. </LinearLayout>

show_main

可以下载apk:

http://pan.baidu.com/s/1eQjfcSq

四则运算app总结的更多相关文章

  1. 四则运算app工程的进展

    深入分析五个四则运算app: 1.ALM-Addition 缺点:版本是英文版,不利于孩子们弄懂.  用选择题的方法来选择正确的答案,固然有运气答对的成分,不利于统计真实的水平. 优点:有图标统计答题 ...

  2. 《软件工程》小组团队项目-小学生四则运算APP(First Sprint)

    <软件工程>团队项目我们小组选择了小学生四则运算APP,在上学期原有的项目基础上进行更新升级.(自我感觉我们团队上学期的小学生四则运算APP是较为成功且实用的,不过这学期学习到了新的知识, ...

  3. 小学四则运算APP 最后阶段

    团队成员:陈淑筠.杨家安.陈曦 团队选题:小学四则运算APP 这次发布的是我们APP的最终版本!图片背景有根据用户需求改变!还增加了草稿纸运算的画布功能! 运行结果如下: package com.ex ...

  4. 小学四则运算APP 第三阶段冲刺-第一天

    团队成员:陈淑筠.杨家安.陈曦 团队选题:小学四则运算APP 第三次冲刺阶段时间:12.12~12.19 本次发布的是音乐播放功能,可以根据用户需求一边播放音乐一边做题,也拥有暂停播放音乐的功能,增强 ...

  5. 小学四则运算APP 第二阶段冲刺-第五天

    团队成员:陈淑筠.杨家安.陈曦 团队选题:小学四则运算APP 第二次冲刺阶段时间:11.29~12.09 本次发布的是判断题代码,已经实现部分功能,,但是美中不足的是判断错误 panduanset.j ...

  6. 小学四则运算APP 第二次冲刺 第四天

    团队成员:陈淑筠.杨家安.陈曦 团队选题:小学四则运算APP 第二次冲刺阶段时间:11.29~12.09 本次发布的是合并后的选择题功能界面的设置: ChoiceSet.java: package c ...

  7. 小学四则运算APP 第二阶段冲刺-第三天

    团队成员:陈淑筠.杨家安.陈曦 团队选题:小学四则运算APP 第二次冲刺阶段时间:11.29~12.09 本次发布的是判断题的部分代码 panduanset.java import com.examp ...

  8. 小学四则运算APP 第二次冲刺-第二天

    团队成员:陈淑筠.杨家安.陈曦 团队选题:小学四则运算APP 第二次冲刺阶段时间:11.29~12.09 本次发布的判断题功能界面的设置: activity_panduan_set.xml: < ...

  9. 小学四则运算APP 第二个冲刺 第一天

    团队成员:陈淑筠.杨家安.陈曦 团队选题:小学四则运算APP 第二次冲刺阶段时间:11.29~12.09 本次发布的是已完成的功能二(选择题): ChoiceActivity.java: packag ...

  10. 小学四则运算APP 第一个冲刺 第八天

    团队成员:陈淑筠.杨家安.陈曦 团队选题:小学四则运算APP 第一次冲刺阶段时间:11.17~11.27 本次发布的是还未完成的功能二(选择题): ChoiceActivity.java: packa ...

随机推荐

  1. 宿主在Windows Service中的WCF(创建,安装,调用) (host到exe,非IIS)

    1. 创建WCF服务 在vs2010中创建WCF服务应用程序,会自动生成一个接口和一个实现类:(IService1和Service1) IService1接口如下:   using System.Ru ...

  2. Linux命令——压缩和解压缩

    Linux命令--压缩和解压缩 尽管文件后缀名在Linux中没什么用,但还是来看看: .gz:表示由gzip压缩工具压缩的文件 .bz2:表示由bzip2压缩工具压缩的文件 .tar:表示由tar打包 ...

  3. shiro实战系列(十三)之单元测试

    由于我们已经涉及到了 Subject reference,我们知道 Subject 是“当前执行”用户的特定安全视图,且该 Subject 实 例绑定到一个线程来确保我们知道在线程执行期间的任何时间是 ...

  4. unset MAILCHECK

    文件/etc/profile尾部有: unset MAILCHECK 为了解决:每次登陆linux总是提示:you hava a new mail

  5. C++与C#互调dll的实现步骤

    这篇文章主要介绍了C++与C#互调dll的实现步骤,dll动态链接库的共享在一些大型项目中有一定的应用价值,需要的朋友可以参考下 本文实例展示了C++与C#互调dll的实现步骤,在进行大型项目共享dl ...

  6. CentOS7+ anaconda3 + Python-3.6 + tensorflow-cpu-1.5安装和配置

    CentOS7+ anaconda3 + Python-3.6 + tensorflow-cpu-1.5安装和配置 ========================================== ...

  7. 重写Override和重加载Overload

    1.方法的重写规则 参数列表必须完全与被重写方法的相同: 返回类型必须完全与被重写方法的返回类型相同: 访问权限不能比父类中被重写的方法的访问权限更低.例如:如果父类的一个方法被声明为public,那 ...

  8. Android failed to start daemon

    异常描述:在Eclipse中运行Android项目时Console中出现: The connection to adb is down, and a severe error has occured. ...

  9. 微信OAuth2.0网页授权接口

    微信OAuth2.0网页授权接口 微信OAuth2.0网页授权接口的thinkphp实现版本号.主要实现了oauth网页受权,以及部分其它接口. 用法 为什么用OAuth2.0受权? 通过OAuth2 ...

  10. ubuntu14.04安装jupyter notebook

    1.使用pip安装Jupyter notebook: pip install jupyter notebook 2.创建Jupyter默认配置文件: jupyter notebook --genera ...