Here's what I'm doing for my project. My question is, how do I populate my ListBox with my Values from my Key, Value pairs, and how do I input validate to see if they selected the right answer?
The purpose of this assignment is to give you a chance to work with an associative container in the context of a game You will create a Windows Forms application that presents the user with a US Geography Challenge. The challenge is to match a random state name with its capital city name. An example of a solution might have an appearance such as the following State Capital Matching Game Select The Capital Alban Annapolis Atlanta Augusta Austin Baton Rouge Bismarck Boise Boston Carson City Charleston Cheyenne Columbia What is the capital of: Louisiana Time Left to Answer 10 Attempts Correct Next Question End Game Concord Specifications A text file named states.txt is provided. In is a comma-delimited file containing the names for the capital cities and states for all 50 states in the US. Store the data from this file in a SortedDictionary
with the state name as the key and its capital city name as the value. The program should present the user with a random state name and then allow the user 15 seconds to select the appropriate capital city from a sorted list of city names The user's turn ends when a selection is made or when the timer reaches 0. When a selection is made or the timer expires, the timer and list box controls should be disabled. If a selection was made (but not otherwise), it should be compared to the correct answer as stored in the SortedDictionary. The number of attempts and the number of correct answers should be updated appropriately When the user's turn ends, he or she should be prevented from continuing to select a capital city, the timer should not continue to run, and the "score" should be updated appropriately The user clicks the Next Question button to restart the timer, re-enable other controls, and present a new random state for the user to match The user clicks the End Game button to end the game. Regardless of how the application is terminated, a goodbye message that includes the user's percentage of correct answers should be displayed The purpose of this assignment is to give you a chance to work with an associative container in the context of a game You will create a Windows Forms application that presents the user with a US Geography Challenge. The challenge is to match a random state name with its capital city name. An example of a solution might have an appearance such as the following State Capital Matching Game Select The Capital Alban Annapolis Atlanta Augusta Austin Baton Rouge Bismarck Boise Boston Carson City Charleston Cheyenne Columbia What is the capital of: Louisiana Time Left to Answer 10 Attempts Correct Next Question End Game Concord Specifications A text file named states.txt is provided. In is a comma-delimited file containing the names for the capital cities and states for all 50 states in the US. Store the data from this file in a SortedDictionary with the state name as the key and its capital city name as the value. The program should present the user with a random state name and then allow the user 15 seconds to select the appropriate capital city from a sorted list of city names The user's turn ends when a selection is made or when the timer reaches 0. When a selection is made or the timer expires, the timer and list box controls should be disabled. If a selection was made (but not otherwise), it should be compared to the correct answer as stored in the SortedDictionary. The number of attempts and the number of correct answers should be updated appropriately When the user's turn ends, he or she should be prevented from continuing to select a capital city, the timer should not continue to run, and the "score" should be updated appropriately The user clicks the Next Question button to restart the timer, re-enable other controls, and present a new random state for the user to match The user clicks the End Game button to end the game. Regardless of how the application is terminated, a goodbye message that includes the user's percentage of correct answers should be displayed