Advertisement
Guest User

Untitled

a guest
Mar 18th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. import java.io.File;
  2. import java.util.*;
  3. public class Test {
  4. int score;
  5. Random rand;
  6. String name;
  7. String[] names = new String[5];
  8. double[] scores = new double[5];
  9.  
  10. public Test(){
  11. Scanner in = new Scanner(System.in);
  12. System.out.print("Enter your name: ");
  13. name = in.next();
  14. System.out.println("History Quiz");
  15. try{
  16. Scanner stdin = new Scanner(new File("highScores.txt"));
  17. }
  18. catch(Exception e){
  19. System.out.print("In Test constructor");
  20. }
  21. }
  22.  
  23. public void compareScore(){
  24. for(int k = 0; k < scores.length; ++k){
  25. if(score > scores[k]){
  26. for(int l = k; l < scores.length; ++l){
  27.  
  28. }
  29. }
  30. }
  31. }
  32.  
  33. public void giveTest(){
  34. int numCorrect = 0;
  35. System.out.println("Select the answer that best fits the question.");
  36. for(int k = 0; k < 5; ++k){
  37. int x = rand.nextInt(20)+1;
  38.  
  39. }
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement