QuizTime2 - "Java" temp.setComplexity(1 q.add(temp...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************************** // QuizTime2.java Author: Lewis/Loftus // // Solution to Programming Project 6.11 // //******************************************************************** / public class QuizTime2 { public static void main(String[] args) { Quiz2 q = new Quiz2(); Question temp; temp = new Question ("What is the wind speed flight velocity of a swallow?", "African or European?"); temp.setComplexity(2); q.add(temp); temp = new Question ("What color was George Washington's white horse?", "white"); temp.setComplexity(1); q.add(temp); temp = new Question ("How much wood could a woodchuck chuck?", "Wouldn't know"); temp.setComplexity(2); q.add(temp); temp = new Question ("What's my favorite programming language?",
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: "Java"); temp.setComplexity(1); q.add(temp); temp = new Question ("What is the capital of Bolivia?", "La Paz"); temp.setComplexity(4); q.add(temp); temp = new Question ("How many moons does the planet Venus have?", "zero"); temp.setComplexity(4); q.add(temp); temp = new Question ("Outside of the USA, what is the largest software producing country?", "Ireland"); temp.setComplexity(4); q.add(temp); temp = new Question ("What country is Mt. Everest located in?", "Nepal"); temp.setComplexity(3); q.add(temp); q.giveQuiz(3,5); System.out.print("\nResults:\n\tCorrect: " + q.getNumCorrect()); System.out.println("\tIncorrect: " + q.getNumIncorrect()); } }...
View Full Document

This note was uploaded on 05/17/2011 for the course COP 3530 taught by Professor Davis during the Spring '08 term at University of Florida.

Page1 / 2

QuizTime2 - "Java" temp.setComplexity(1 q.add(temp...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online