From essays to dissertations, we have experts for all of your assignments!

dot
  • 1.provide your instructions
  • 2.choose an expert in your field
  • 3.track the order progress

C# CSV File READ AND WRITE Assignment

Creating a simple C# console application that completes the stated task:

Trivia Game Part 1 – Lists
Write a program that plays a simple trivia game on a
topic on your choice. The game will read questions from a CSV file. Each question has a corresponding
answer and point value between 1 and 3 (based on the difficulty of the question). Implement the game
using three lists. A list of type string should be used for the questions. Another list of type string should be
used to store the answers. A list of type int should be used for the point values.
The index into the three lists can be used to tie the question, answer, and point value together. For
example, the item at index 0 for each list would correspond to question 1, answer 1, and the point value
for question 1. The item at index 1 for each list would correspond to question 2, answer 2, and the point
value for question 2, and so forth. Manually create at least ten questions, answers, and point values and
store it in a CSV file. When the program starts, read the questions from the CSV text file into your
program.
Your program should ask the player each question one at a time and allow the player to enter an answer.
The answer should not be case-sensitive. If the players answer matches the actual answer, the player
wins the number of points for that question. If the players answer is incorrect, the player wins no point
for the question. Your program should show the correct answer if the player is incorrect. After the player
has answered all questions, the game is over, and your program should display the players total score.
Trivia Game Part 2 Data Class
Write a program that is a modification of the Trivia
Game in Part 1 to use a single list instead of three lists. This can be accomplished by creating a Trivia
object that encapsulates the question, answer, and the point value for a particular trivia question.
Next, create a single list of Trivia objects (instead of three separate lists for the question, answer, and
point values). This change will make your program more scalable if there were ever additional properties
to add to a Trivia object (you would not need to add another list for each property). Although the program
has internally changed to a single list of objects, the execution of the program should be identical to
before.

I don’t need help with the questions or point values, simply how to write to a CSV file and read a CSV file into a list. As well, how to correlate those lists in relation to each other.

PLEASE HELP! Thank you

You can leave a response, or trackback from your own site.

Leave a Reply

Powered by WordPress | Designed by: Premium WordPress Themes | Thanks to Themes Gallery, Bromoney and Wordpress Themes