Question
Requirement:
1. There should be a txt file contain a list of words (more than 10). Every word has properties: word number, word, explanation, word points(0 to 5).

2. The app will read characters from the file, then pass those characters to generate flash card quiz. (Can use JSON to handle the data structure).

3. During the quiz, The first side will show explanation, word number of the word, then user click the card and flip it.

4. After flip the card, app should display 3 cards which will trick the user. 1 card holds the right answer, another 2 will trick user with very close answer.

5. If user choose right answer, that will add 1 point to certain word in the list file and display message correct to user.
   If user choose wrong answer, then get 0 points and display you are wrong message to user.
6. After quiz finish, it should display result of the quiz (ex:correct rate, wrong words).

7. The way to choose a card: If every word hold same number of points, choose them randomly. If not, choose word that has lowest point first to generate card.

8. We need one button to trigger displaying the word list and give user option to delete words. When word is deleted, the order of other words may change. It should be like:

1. dog       after delete apple    1. dog
2. cat                                           2. cate
3. apple                                       3. banana
4. banana                                    4. lol
5. lol                                              ...
...

9. No need to design any UI. Just keep functions working.
Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references.
Students may use these solutions for personal skill-building and practice.
Unethical use is strictly forbidden.

public class AnswerActivity extends AppCompatActivity {

    private TextView txtExp;

    private Button btnSubmit;
    private String mId;

    private String selectedId;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.activity_answer);

       setTitle("Answer");

       View recyclerView = findViewById(R.id.word_list_options);
//       assert recyclerView != null;

       Intent intent = getIntent();

       String exp = intent.getStringExtra("explanation");
       mId = intent.getStringExtra("answer_id");
       String answer_word = intent.getStringExtra("answer_word");

       String opt1 = intent.getStringExtra("option1");
       String idOpt1 = intent.getStringExtra("option1_id");

       String opt2 = intent.getStringExtra("option2");
       String idOpt2 = intent.getStringExtra("option2_id");


       WordItem wordItem1 = new WordItem(idOpt1, opt1, "");
       WordItem wordItem2 = new WordItem(idOpt2, opt2, "");
       WordItem wordItem3 = new WordItem(mId, answer_word, exp);

       List<WordItem> words = new ArrayList<>();

       Random random = new Random();

       WordItem[] wordItems = new WordItem[3];

       int index = random.nextInt(3);

       wordItems[index] = wordItem1;
       int index2 = index;
       while (index2 == index){
            index2 = random.nextInt(3);
       }
       wordItems[index2] = wordItem2;
       int index3 = index2;
       while (index3 == index2 || index3 == index){
            index3 = random.nextInt(3);
       }
       wordItems[index3] = wordItem3;

       words = Arrays.asList(wordItems);
This is only a preview of the solution.
Please use the purchase button to see the entire solution.
By purchasing this solution you'll be able to access the following files:
Solution.zip
Purchase Solution
$155.00
Google Pay
Amazon
Paypal
Mastercard
Visacard
Discover
Amex
View Available Computer Science Tutors 645 tutors matched
Ionut
(ionut)
Master of Computer Science
Hi! MSc Applied Informatics & Computer Science Engineer. Practical experience in many CS & IT branches.Research work & homework
5/5 (6,808+ sessions)
1 hour avg response
$15-$50 hourly rate
Pranay
(math1983)
Doctor of Philosophy (PhD)
Ph.D. in mathematics and working as an Assistant Professor in University. I can provide help in mathematics, statistics and allied areas.
4.6/5 (6,703+ sessions)
1 hour avg response
$40-$50 hourly rate
Leo
(Leo)
Doctor of Philosophy (PhD)
Hi! I have been a professor in New York and taught in a math department and in an applied math department.
4.9/5 (6,469+ sessions)
2 hours avg response

Similar Homework Solutions