Welcome

Congratulations! You've just landed a new job at Ye Olde Digital Toy Shoppe, a firm that produces entertaining and educational Java applications for kids. Along with your new computer you've been given the company's IDE: NetBeans 4.2.

Task 1:

Feel free to spend a few moments looking through the IDE. Please remember to think aloud while you browse.

Task 2:

Time to get going. Please create and run a simple "Hello World" application. The end result should be a "Hello World" message printed to the console.

Task 3:

Now try to create more compliacted version of "Hello World" application with a nested loop:

repeat five times
    repeat five times 
        print "Hello World"
        wait 100 miliseconds
    print "Again"
For waiting use Thread.currentThread().wait().

The application output should look like this:

Hello World
Hello World
Hello World
Hello World
Again
Hello World
Hello World
Hello World
Hello World
Again
Hello World
...

Task 4:

Your manager sent you mail that you'll be working on an Anagram game. The changes you need to make are with an application already set up by another team member. You will find the application here:

c:\work\AnagramGame

Try to run the application using NetBeans IDE.

Task 5:

Now you need to make changes to the code. The WordLibrary class has scrambled and unscrambled words hard coded into it. Your manager asked you to replace the hard coded words by reading the words from the "wordlist.txt" file.

You might use the following hints:

To scramble the words use:

private String scramble(String word) {
    int size = word.length();
    StringBuffer buffer = new StringBuffer();
    
    for (int i = 0; i + 1 < size; i += 2) {
        buffer.append(word.charAt(i + 1));
        buffer.append(word.charAt(i));
    }

    if (buffer.length() < word.length()) {
        buffer.append(word.charAt(word.length() - 1));
    }
    
    return buffer.toString();
}	

Behavior of the application should not change after these modifications. Please test your application and make sure that it works.