Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions

Question

2. What type of team would you recommend?

Answered: 1 week ago