Guest User

Untitled

a guest
Jun 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. //********************************************************************
  2. // QuizTime2.java Author: Lewis/Loftus
  3. //
  4. // Solution to Programming Project 6.11
  5. //
  6. //********************************************************************
  7.  
  8. public class QuizTime2
  9. {
  10. public static void main(String[] args)
  11. {
  12. Quiz2 q = new Quiz2();
  13.  
  14. Question temp;
  15.  
  16.  
  17. temp = new Question ("What is the wind speed flight velocity of a swallow?",
  18. "African or European?");
  19. temp.setComplexity(2);
  20. q.add(temp);
  21.  
  22. temp = new Question ("What color was George Washington's white horse?",
  23. "white");
  24. temp.setComplexity(1);
  25. q.add(temp);
  26.  
  27. temp = new Question ("How much wood could a woodchuck chuck?",
  28. "Wouldn't know");
  29. temp.setComplexity(2);
  30. q.add(temp);
  31.  
  32. temp = new Question ("What's my favorite programming language?",
  33. "Java");
  34. temp.setComplexity(1);
  35. q.add(temp);
  36.  
  37. temp = new Question ("What is the capital of Bolivia?",
  38. "La Paz");
  39. temp.setComplexity(4);
  40. q.add(temp);
  41.  
  42. temp = new Question ("How many moons does the planet Venus have?",
  43. "zero");
  44. temp.setComplexity(4);
  45. q.add(temp);
  46.  
  47. temp = new Question ("Outside of the USA, what is the largest software producing country?",
  48. "Ireland");
  49. temp.setComplexity(4);
  50. q.add(temp);
  51.  
  52. temp = new Question ("What country is Mt. Everest located in?",
  53. "Nepal");
  54. temp.setComplexity(3);
  55. q.add(temp);
  56.  
  57. q.giveQuiz(3,5);
  58.  
  59. System.out.print("\nResults:\n\tCorrect: " + q.getNumCorrect());
  60. System.out.println("\tIncorrect: " + q.getNumIncorrect());
  61. }
  62. }
Add Comment
Please, Sign In to add comment