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 place an order similar to this with us. You are assured of an authentic custom paper delivered within the given deadline besides our 24/7 customer support all through.
Latest completed orders:
# | topic title | discipline | academic level | pages | delivered |
---|---|---|---|---|---|
6
|
Writer's choice
|
Business
|
University
|
2
|
1 hour 32 min
|
7
|
Wise Approach to
|
Philosophy
|
College
|
2
|
2 hours 19 min
|
8
|
1980's and 1990
|
History
|
College
|
3
|
2 hours 20 min
|
9
|
pick the best topic
|
Finance
|
School
|
2
|
2 hours 27 min
|
10
|
finance for leisure
|
Finance
|
University
|
12
|
2 hours 36 min
|