Purpose - East Tennessee State University



PurposeThe 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.SpecificationsA text file named states.txt is provided. It is a comma-delimited file containing the names for the capital cities and states for all 50 states in the United States. Read the data from this text file, and store it in a SortedDictionary <string, string> with the state name as the key and its capital city name as the value. A zipped folder named states.zip is provided that contains small .jpg files representing pictures of each of the states as they might appear on a map of the United States. (See the center of the screenshot above for an example).Unzip the states.zip file and copy its contents into a folder in your project named State Pictures.Use LINQ with the State Pictures directory to create an array containing the file name and path of each of the picture files. When a random state name is displayed (see screenshot above), the ImageLocation property of the PictureBox control in the form should be updated to contain the path information of the picture of that state using the array of path information in the previous sentence.The program should accomplish the following tasks using the SortedDictionary and the array of path information created above for the pictures provided.The program should present the user with a random state name and then allow the user 20 seconds to select the appropriate capital city from a sorted list of city names.The user’s turn ends when a selection is made from the list of capitals or when the timer reaches 0 whichever occurs first. 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), the selected capital should be compared to the correct answer 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 with its capital.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.A welcoming splash screen should greet the user. For example:The timer should work accurately.The appearance of the window should be appropriate with controls aligned or centered appropriately. The caption should be appropriate, and the look-and-feel of the application should be user-friendly. Controls should be read-only or disabled as appropriate to prevent the user from taking actions that are not allowed.The window should be centered on the screen, have an appropriate icon, and all dialogs it spawns should be centered on the window.The program must create, populate, and use the SortedDictionary as described. Do not hard code a long set of if statements or a long switch/case.Use information from AssemblyInfo.cs appropriately in this assignment.In this assignment, use only techniques and materials covered in the course. Do not use other code, materials, techniques, controls, or other items not discussed in the course without specific permission from the instructor.Brief VideoA brief video of part of the program as it is running may be seen here. Make your program work like the video in the sense that when one presses the “Next Question” button, a random state is selected by the program, a picture of the state is displayed, the list of capital cities is enabled, and the timer begins running. When the timer expires or a possible capital is selected, the timer stops and the “attempts” and “correct” scoreboard items are updated. The program continues until the “End Game” button is clicked.DeliverablesSubmit the completed project with all associated files in a properly named zipped folder as described in the Course Facts document. This assignment is to be done individually. For this assignment, no late submissions will be accepted. ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download