Working Memory Experiment Program
<p>I have to create a program that is used as a short term memory experiment. It is not meant to be excessively difficult because the class I am doing this for is only an entry level class. Basically I have to generate a sequence of numbers, show them to the subject, make it disappear, then ask them to recall the sequence. Then, I have to calculate the accuracy for each sequence. The code supplied is all in java, and is code that must be used. I am not very good at programming and am struggling with such a seemingly simple program. Thanks for all who help in advance. Here is the code...</p>

<pre><code>import java.util.*;

public class wme
{
    static int Pause = 4;
    static int Screen_Size = 100;

    public static void main(String[] args) 
    {
        Scanner keyboard = new Scanner(System.in);

    //USED TO CALC. USER'S ACCURACY
    int accuracy;

    //TELLS USER NUMBERS ARE COMING
    System.out.println("Here are your numbers: ");

    generateDigits(maxDigits);

    pause(seconds);

    int num = 0;
    final int result = result;
    if (num == result )
    {
        System.out.println(result);
    }




    System.out.println("What are the numbers?");
    accuracy = keyboard.nextInt();

    }

    /**
     *GENERATES A RANDOM #
     */
    public static String generateDigits(int maxDigits)
    {
        Random generator = new Random();
        int numberDigits = generator.nextInt(maxDigits) + 1;
        String result = "";

        for(int n = 0; n &lt; numberDigits; n++)
        {
            result = result + generator.nextInt(10);
        }

        return result;

    }

    /**
     *SETS COMP. TO SLEEP FOR SPECIFIED SECONDS
     */
    public static void pause (int seconds)
    {
            try
        {
            Thread.sleep(seconds * 1000);
        }

        catch (InterruptedException e){}
    }


}
</code></pre>
