Advertisement
Guest User

Untitled

a guest
Jun 25th, 2013
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.75 KB | None | 0 0
  1.         private String[][] questionsArray = new String[][]
  2.         {
  3.             {"Is sky blue?", "true"},
  4.             {"Is sky green?", "false"}
  5.         };
  6.        
  7.         private String answer = "";
  8.         private String Currentanswer = "";
  9.         private String question = "";
  10.         private int level = 0;
  11.         private boolean returnValue = false;
  12.        
  13.         public String getQuestion(int Level) {
  14.             switch (Level) {
  15.            
  16.             case 1:
  17.                 question = questionsArray[0][0];
  18.             break;
  19.            
  20.             case 2:
  21.                 question = questionsArray[1][0];
  22.             break;     
  23.             }
  24.            
  25.             return question;
  26.         }
  27.        
  28.         public String getAnswer(int Level) {
  29.             switch (Level) {
  30.            
  31.                 case 1:
  32.                     answer = questionsArray[0][1];
  33.                 break;
  34.                
  35.                 case 2:
  36.                     answer = questionsArray[1][1];
  37.                 break;         
  38.             }
  39.            
  40.             return answer;
  41.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement