Homework Level: Tron Guy, for Grade A

1.  Trivia Game Modification

In class we showed how to make a trivia game using arrays.  Extend the class example with an additional array that assigns a point value to each question.  The player's total score now becomes the sum of the point values for each question answered correctly.

More specifically:

The game should have 5 questions. Each question has a corresponding answer and point value between 1 and 10 based on the difficulty of the question. Implement the game using three arrays. An array of type string should be used for the questions. Another array of type string should be used to store the answers. An array of type int should be used for the point values.

All three arrays should be declared to be of size 5. The index into the three arrays can be used to tie the question, answer, and point value together. For example, the item at index 0 for each array would correspond to question 1, answer 1, and the point value for question 1. The item at index 1 for each array would correspond to question 2, answer 2, and the point value for question 2, and so forth.

Manually hardcode the five questions, answers, and point values into your program using trivia of your choice. Your program should ask the player each question one at a time and allow the player to enter an answer. If the player's answer matches the actual answer, the player wins the number of points for that question. If the player's answer is incorrect, the player wins no points for the question. Your program should show the correct answer if the player is incorrect. After the player has answered all five questions the game is over and your program should display the player's total score.

2.  Choose Your Own Program

The last program is open-ended.  You get to write a program that is of interest to you.  Pick anything you like that you would like to do.  The restrictions are that your program must include methods, loops, and use a new control that we have not covered in class or only briefly covered in class. 

Before you start work please talk to me or email me with a short description of your proposed program so I can make sure it is of appropriate complexity (not too hard, not too easy).