Zuilee
2012-05-10 01:01:16 UTC
Develop programming and problem solving skills and learn basic data structures by
building a Java application using ADT stack and ADT queue.
Requirements:
You should develop a Java program RecognisingPalindrome.java, which reads any given text file, separates the entire text into individual characters (letters, digits,punctuation marks, special symbols, etc.), and recognises whether the sequence of letters and digits in the text is a palindrome. Your program should take into account only English letters and digits in the text, but not other characters and spaces, as well as it should not discriminate between the upper- and lower-case letters. The program should implement a nonrecursive recognition algorithm, using the reference-based implementations of both the ADT stack and ADT queue.
Your Java program should be placed into a single source le RecognisingPalindrome.java, which includes all the interfaces, classes, and methods you used. The compiled application should run from a command line: java RecognisingPalindrome
example;
File palin.txt: a palindrome (951 characters; 839 letters/digits) or
File plain.txt: not a palindrome (951 characters; 839 letters/digits)
Comments at the very beginning of your source file must give clear instructions, which explain how to compile and run your application. The scheme below is expected from your program.
*does not require Graphical User Interface (GUI).
now these are the requirements (scheme):
*Clear commenting of the code and full instructions to compile and run the program
*Structure: appropriately dened class(es), instance variables, instance and class methods, etc.
*Clear interaction with the user (self-explanatory prompts, handling illegal input data)
*Use of try/catch/nally blocks to handle exceptions
*Reading a text le and separating the text into individual characters
*Proper exclusion of characters which are not letters and digits
*Proper handling of upper- and lower-case characters
*Correct building of a stack and a queue of individual letters and digits
*Correct determining whether the input text is or is not a palindrome
I DO NOT know what to do!!
symbols such as "#$%^&*"........can be ignored between the text