Rehearser version 1.0:
the rehearsal assistant

by Oded Livneh and Zvika Aronowitz

The Rehearser is a general-purpose tool for rehearsing facts.
It can be equally well used for learning traffic signs, foreign language, basic arithmetic or spelling.
The basic concepts of the Rehearser are a rehearsal, a fact, a subject and a predicate.
A subject (sometimes called a question) is the stimulus presented to the person taking the rehearsal.  The predicate (sometimes called the answer) is what the user should think about the subject.  This connection between the subject and the predicate will become clearer after trying the sample rehearsals attached.
The pair subject-predicate is called fact.
A rehearsal is a collection of facts, usually about some common issue.
A rehearsal is the standard data collection unit for the Rehearser, just like a document is to a word processor.
Yet in equivalence with word processor, you can use the Rehearser for both compose a rehearsal (in equivalence with composing a document) and rehearsing (in equivalence with reading) rehearsals composed by others.
Usage
The main file of the project is ex3.java.
In order to run the project write 
java ex3
You will then be prompted to select an interface language (the Rehearser enable anyone to compose a customize interface).
After selecting the language you will enter the main screen.  From that point on, every thing is either self-explained or help-explained.

Other file do have a main() function, but it is used for debug, not for functionality.

Picture and sound file installation
The lessons uses absolute file paths.
Therefore, in order for the attached example lessons find the files, the attached directory “rehearse” must be directly in C (C:\rehearse).

Demo rehearsals
4 demo rehearsals are attached: 
•	spell.rhs
·	תמרורים.rhs
•	multiplication.rhs
•	translations.rhs

Technical preface
The full technical details are in the code.
Classes
The conceptual structure of subject-predicate-fact-rehearsal is reflected in the class names, with a single exception: the rehearsal is called a CLesson.
Since the subject and the predicate are both pieces of knowledge, they were given the name mem (and class CMem).  The reason is discussed in the file CMem.java .

Class CLesson_Interface was used to separate the work on the GUI from the fork on the data.
Class CTest is self-explanatory.
Class CHelp encapsulates help strings.
Class CInterface_selection is also used for file selection.  
Class NSProject_Utils.java is a name space for general utilities.

Data format in a rehearsal file
A CLesson contains a list of CFact objects.  Each CFact object contains 2 CMem objects (a subject and a predicate).
The ingredients of each class are separated by the class delimiter.
Therefore, each class can pars itself from a string by parsing it using the class delimiter and passing some of the parts to the parsers of its member variables.
The other way is also true: each class can present itself in a string that is easily saved.
This parsing is done by a static member function of the class, resulting in a new object of the class.
The parsing verify the class is correct by reading the class name.  This can not be done by getClass() . getName(), because the parser is static.  This is solved using the ClassName() static member function in functions that need to be saved on disk.

While saving a class in a string format, line breakers “\n” are replaced with “<br>”.
All class delimiters use the <…> structure.
 
Imported files
2 files were imported:
ExampleFileFilter.java was imported from the JKD demo, and is used for filtering files.
ConsoleReader.class was imported from the public domain.  It is used for command prompt running.  This is used mainly for debugging and testing.
Test environment
This program was tested on JDK 1.3 release candidate 2.

Main known bag
In editing a fact, the images are not previewed.