next up previous contents
Next: Question 3 (25 points) Up: Questions Previous: Question 1 (20 points)   Contents

Question 2 (20 points)

The availability of computers with string manipulation capabilities has resulted in some rather interesting approaches to analysing the writing of great authors. Much attention has been focused on whether William Shakespeare ever lived. Some scholars believe there is substantial evidence indicating that Christopher Marlowe or other authors actually penned the masterpieces attributed to Shakespeare. Researchers have used computers to find similarities in the writings of these two authors. This exercise examines a method for analysing texts with a computer.
Write an application that runs in two modes (encoding and decoding), depending on the command-line input:

Input of numbers, characters and multiple spaces can be ignored for your implementation.

One of the main aims and marking criteria of this question is finding a suitable algorithm for the encoding/decoding. Nested if-statements will not be highly appreciated in terms of marks. Furthermore your program will be tested for its robustness. You can use any library classes you feel appropriate.

Explain in the comments of your main class how you could extend your program to deal with the number encoding and decoding of numbers, characters and multiple spaces.


next up previous contents
Next: Question 3 (25 points) Up: Questions Previous: Question 1 (20 points)   Contents
Marina De Vos 2004-10-28