Question: Assignment 4 JAVA PROGRAMMING CS203 Flashcard Application III - Study Systems due on Sunday , Oct 21 Objectives: Encapsulation, Inheritance Note: You can work on

Assignment 4 JAVA PROGRAMMING

CS203

Flashcard Application III - Study Systems

due on

Sunday

, Oct 21

Objectives:

Encapsulation, Inheritance

Note:

You can work on this assignment individually or in a team of two.

A flashcard applications can have several study methods, such as Leitner, Drill, or Simple.

Extend the flashcard application with these three study methods.

Leitner system

: The application randomly picks a card from one of the five boxes. Note, the

likelihood of a card to be picked from a lower numbered box is exponentially higher than from

a higher numbered box. For example, for a card in Box 1 it is twice as likely to be picked as

a card in Box 2 (four times as likely as a card in Box 3, ...). If the user knows the answer,

the flashcard moves to the next box (if there is one). If the user does not know the answer,

the flashcard is moved back to Box.

Simple

: Under this method, the student chooses a box by number. The study method picks

the

first card

and presents it to the user. If the student knows the answer, the card moves

one box higher (if a higher box exists). If the student does not know the answer, the card

moves one box lower (if a lower box exists).

Drill

: Under this method, the flashcards of a given box are copied into a separate pool. The

application randomly picks one flashcard from that pool. If the user knows the answer, the

card is removed from the pool. If the user does not know the answer the card remains in the

pool. Drill ends when the pool is empty. When users end the drill session, the pool can be

discarded. During a drill session the Leitner boxes remain unchanged.

A user can start a study session by typing leitner, simple boxnum , and drill boxnum , in the

TUI. A study session randomly chooses to present the student one side of the card. As response,

a student enters a string.

Empty string: Indicates that the student knows the answer. The card is moved to the next

higher box (if any). The application proceeds by randomly picking another card.

Non-empty string: The string is compared with the other side of the flashcard. If the strings

are identical, the answer is correct and the flashcard moves to the next box (if any). If the

answer is incorrect, the flashcard is placed in Box 1. The application proceeds by randomly

picking another card.

Special strings: (1) !exit indicates that the student ends the study session. The currently

displayed flashcard remains in the same box. (2)

Tasks

You may continue developing your own classes or you may start from the model solution for

Assignment 4 (posted on Canvas).

Design or revise

your TUI in the following way: The study

session should not interact with any concrete study method class. Instead, create an

abstract class

1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!