Im in my second semester of uni for Java. My assignment is as follows:

"In this assignment you will write an application that simulates a trivia game. You will be given a text file that contains a set of questions and answers in six different categories. Your program will select a random question from each category to be answered by the player. The score will be displayed at the end of each run.

Input data format: The input file contains questions and answers in different categories. For each category, the first line indicates the name of the category. This line will be followed by a number of pairs of lines. The first line of the pair is the question, and the second line is its corresponding answer. A blank line separates the categories. Technical requirements:

 Create a class called TriviaQuestion that represents a typical question object.

 After reading the data, store the information inside ArrayList(s).

 Be user friendly in your input/output. Ignore cases. Accept partially correct answers if possible."

Heres my troubles. I am able to read the file and put the info into an ArrayList, but have no idea how to get it to do what the professor is asking for. I have never done such a project and Im just trying to figure out how to break it down to be more manageable.

Heres my code i have been using so far.

Java Code:
public class TriviaGamePlayer {

public static void main(String[] args) throws IOException {
	 File gameFile = new File("trivia.txt");
	    List<TriviaGame> triviaQuestions = new ArrayList<TriviaGame>();
	    Scanner infile = new Scanner(gameFile);
	    String lastKnownCategory = "";

	    while (infile.hasNextLine()) {
	        String currentLine = infile.nextLine();

	        if (!currentLine.isEmpty()) {
	            TriviaGame currentQuestion = new TriviaGame();

	            if (currentLine.endsWith("?")) {
	                currentQuestion.category = lastKnownCategory;
	                currentQuestion.question = currentLine;
	                currentQuestion.answer = infile.nextLine();
	            } else {
	                currentQuestion.category = currentLine;
	                currentQuestion.question = infile.nextLine();
	                currentQuestion.answer = infile.nextLine();
	                lastKnownCategory = currentLine;
	    System.out.println((int)Math.random() * (triviaQuestions.size()));


And that is where I get stuck. Can I use this code of the info it displays to match the assignment or do I have to totally rethink my plan of attack. Reading from a file to fill a list is one thing, but doing all this manipulation is beyond my skill right now. Any help would be appreciated.

EDIT, in case someone wants to see what the file looks like here is a small sample

Arts & Literature
What are bongo drums traditionally held between for playing?
The knees
The Hugo Awards are given for the best literature in which genre?
Science fiction
What four-letter girl's name gave Jane Austen the title of a comic novel?
Andy Warhol was born in what US city?
Who wrote the novel "The Chocolate War"?
Robert Cormier
What surname for John in "The Importance of Being Earnest" did Oscar Wilde take from the seaside town he vacationed at?

What is the modern day equivalent of Dacia?
What is the capital of Ontario?
Which island boasts of being Napoleon's birthplace?
What nationality is a Breton?
A person from North Carolina is properly known as a what?
North Carolinian
In which country would you find St. Basil's cathedral?