Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use C + + with no use of vectors. Create a vocabulary quiz program that : Reads a master vocabulary file in the current directory.

Use C++ with no use of vectors.
Create a vocabulary quiz program that :
Reads a master vocabulary file in the current directory. The vocabulary file
contains word pairs, with each pair consisting of a word in Spanish and its English translation.
The program will quiz users by asking them to type the Spanish translation of an
English word. Users will initially be prompted to specify the number of questions
they want to be quizzed on. After answering all questions, the program will
check the answers and write the user's grade to a file. There are also counters for the overall statistics on the session which include the number of quizzes takens, quizzes passed at 75% or greater, total number of words reviewed.
This will program will also meet the following requirements:
1. Error Checking:
a. Check if the txt file exists in the folder. If the file does not exist, it will end the
program.
b. There will be a maximum of 25 pair words.
c. Check when the user is asked how many words to be quizzed on, your
program should make sure that it is within the possible range of numbers (i.e.,
between one and the number of English words in the vocabulary file).
d. Do not have the same question repeat. Use a random generator to pull the
question from the vocabulary file. Keep track of the questions asked to avoid repeating a word.
2. Use an English-Spanish vocabulary file to create each quiz.
3. Print the count of Spanish words in the file at the start of the quiz.
4. Store the users each Quiz grade in an output file.
5. Ask the user if he/she wants to take another quiz
6. The final output should display/write the overall # of quizzes with appropriate
summary.
Example Output:
Welcome to English-Spanish Class.
Please enter your name: User Name
Maximum available words in the Quiz: 15 words.
How many questions would you like to be quizzed on?3---------------------------------------------------------
Quiz ---------------------------------------------------------
Question 1
English word: to study
User answer in Spanish: estudiar
Result: Correct! ---------------------------------------------------------
Question 2
English word: to search
User answer in Spanish: buscar
Result: Correct! ---------------------------------------------------------
Question 3
English word: to be
User answer in Spanish: ser
Result: Incorrect. ---------------------------------------------------------
Quiz Summary
Name: User Name
# of Question in the quiz: 3
# of Correct answers: 2
Your % Grade: 67%
Decision: FAILED. The passing score is 75%
NOTE: The quiz report is ALSO stored in an output file: quizSummary.txt.
Do you want to take the quiz again (Y/N): N
Thanks for taking the quiz.
User Name, the following is your quiz summary
# of Quiz completed: 1
# of Quiz successfully passed: 0
# of Quiz failed: 1
# of questions in all quizzes: 3
Highest grade: 67%
1
0
1
3
67%

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

Step: 3

blur-text-image

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions