| META TOPICPARENT |
name="CSC121SylF2025" |
Arrays part 2 Lab: Redo the Language Quiz: Fall 2025
Learning Objective(s)
- Use previous code
- More comfort with arrays
Overview of the Program
Write a program give a language vocabulary quiz. This program should continue to ask questions that are missed
Specifics
- The program is to be called LangQuiz
- The program should prompt for the name of the file with vocabulary words in another language. You should generate your own file. The one provided is a sample. You may use an online tool to generate the list if you wish. Each word pair (first word is the English word, the second is the same word in a language of your choice) should be on a separate line. Some languages will be easier to use than others (because of the alphabet).
- Exceptions should be caught
- The file should only be read once. Information should be stored in arrays.
- The program should continue to ask "random" words (of the ones not answered correctly) until all words are answered correctly.
- The final results include how many attempts (total) it took to answer all words correctly
- You must use the file io processing covered in class (not another learned a different way).
Sample dialogue
Below is a sample dialogue. The prompts may vary but the input given by the user is to be the same format. Your output can vary somewhat as long as the required data is nicely displayed. Notes:
- You will notice the program can be very case sensitive. That is fine.
- One word (Spanish for tree) may not be display right because of the special character. That is fine. The language you pick must display most foreign words correctly.
Filename? EnglSpanShort.txt
My word is Manzana What is it in English? Apple
You were right. I won't ask that word again.
My word is Libro What is it in English? Love
You were wrong. You will will need answer it correctly later.
My word is Gato What is it in English? Cat
You were right. I won't ask that word again.
My word is Perro What is it in English? Dog
You were right. I won't ask that word again.
My word is Libro What is it in English? Book
You were right. I won't ask that word again.
My word is ┴rbol What is it in English? Grass
You were wrong. You will will need answer it correctly later.
My word is Sol What is it in English? Grass
You were wrong. You will will need answer it correctly later.
My word is Sol What is it in English? Sun
You were right. I won't ask that word again.
My word is Casa What is it in English? House
You were right. I won't ask that word again.
My word is Agua What is it in English? Water
You were right. I won't ask that word again.
My word is ┴rbol What is it in English? Tree
You were right. I won't ask that word again.
It took you 11 attempts to answer all correctly.
You can also run a solution for this program if you want. See classroom instructions for more details.
Lab Hints
Submission
- Create a software development report
- For the system design, you need to make your own flowchart.
- For testing report,
- make sure your tests ensure that each statement is executed at least one.
- your expected output CANNOT be pasted from the dialogue of a running. Only the actual output may be pasted
- It should contain two different inputs that are "errors"
- For the improvement section, specify how many points were lost from the last lab that you should not lose points for on this lab because you corrected the problem
- create a pdf document from your software development report
- create an empty zip folder
- place only LangQuiz.java, your own testing files (not mine) and your pdf document into it
- submit the zip folder on canvas
Optional improvements
Optional improvements should ONLY be worked on once the program is completing working. In addition, the work is to be done on your own with little if any help for lab assistants or the instructor.
- Allow the program to handle lowercase or uppercase as the same. If you do this, add a section to the SDR (Extra Credit) explaining how it works
- Allow for a more complex language (such as Korean, Japanese, Arabic, etc.) with a very different alphabet. If you do this, add a section to the SDR (Extra Credit) with instructions on how to make it work on a machine in the lab and how you figured this out.
- Submission instructions
- Call this program LangQuiz2 add it to the zip folder that contains the original solution.
|