How many licks does it take to get to the tootsie roll center of a tootsie pop?
4(this is the correct answer)
one
two
three
four(as in the fourth answer)
2
14
5
What is your name?
3
Arthur, King of the Britons
Sir Lancelot the Brave
Sir Robin the Not-Quite-So-Brave-As-Sir Lancelot
0
14
6
Who's on first?
5
What
Why
Because
Who
I don't know
3
14
7
Which of the following is a terror of the fire swamp?
4
Lightning sand
Flame spurt
R.O.U.S.
All of the above
3
14
4
Who is the all-time greatest pilot?
6
Manfred von Richthofen
Chuck Yeager
Hiraku Sulu
Luke Skywalker
Kara Thrace
Charles Lindbergh
4
14
9
Here is my code:
import java.util.*;
import java.io.*;
public class JavaApplication8 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException{
Scanner inScan = new Scanner(System.in);
String file_name;
System.out.print("What is the full file path name?\n>>");
file_name = inScan.next();
Scanner fScan = new Scanner(new File(file_name));
ArrayList<String> Questions = new ArrayList();
ArrayList<String> possibleAnwers = new ArrayList();
int [] rightAnswer = new int[//number of questions];
while (fScan.hasNextLine())
{
if(fScan.nextLine//contains a question mark)
{
//adds line to question arraylist
//adds next line to answer integer array
//adds next lines to possible answers until an int is found
}
else if(fScan.nextLine//contains an int)
{
//adds to statistics
}
else
Questions.add(fScan.nextLine());
}
}
Do not worry if there aren't all the arrays necessary; I am only worried about how to search for a particular substring/type

New Topic/Question
Reply



MultiQuote




|