Question: Create a NetBeans project named Lab 1 0 6 and ensure it is saved to a location like desktop or your flash drive. In the
Create a NetBeans project named Lab and ensure it is saved to a location like desktop or your flash drive. In the project you will do the following:
Implements the Stack interface described on page of the textbook
Implements the linkedbased Stack class as described on page of the textbook
o The linkedbased Stack class depends on the SinglyLinkedList Class, as described on pages to that you should have already implemented.
Implements the Queue interface described on page of the textbook
Implements the linkedbased Queue as describe on page of the textbook
o The linkedbased Queue class also depends on the SinglyLinkedList Class.
Create a client class that:
o Asks for the name of a valid starting directory
o Processes each file in the starting directory recursion into subdirectories not required and reports if the file contains a palindrome and what type of palindrome it is character word or line See the palindrome PowerPoint slides for the types of palindromes.
o Your client class should have one method named isPalindrome that returns true if its input parameter is a palindrome. This method should use a single comparison technique to determine if the input is a palindrome ie do not write separate isPalindrome methods for each type of palindrome
o The output should be in the form of a nicely formatted ASCII table see example at end of assignment sheet
Write your client so that
o Each input file is only read once. This avoids costly file IO
o A minimum amount of memory is used.
o A single isPalindrome method is used that can be applied to all types of palindromes rather than writing separate methods for each type of palindrome.
o You may need to preprocess the input files to:
Convert to all uppercase or lowercase letters
Remove extra white spaces
Remove extra punctuation characters
Regular expressions can be useful in this preprocessing.
o Do not report the degenerate cases of a palindrome as a positive, ie
A file with a single character meets the requirements for character, word, and line palindromes but is the degenerate case.
A file with a single word would meets the requirements for word and line palindromes but is the degenerate case.
A file with a single line meets the requirements for a line palindrome but is the degenerate case.
When you create classes from the textbook it is suggested that you transcribe the code into your NetBeans project. While this may seem like busy work it does force you to look at each class line by line and you may find that it will help you to better understand how each class works.
Labdata.zip is an archive that contains example input files. Each file:
May or may not contain a single palindrome
o The palindrome may or may not be a character palindrome
o The palindrome may or may not be a word palindrome
o The palindrome may or may not be a line palindrome
o The types of palindromes are not mutually exclusive, eg a palindrome may be both a word palindrome and a line palindrome
each data file ends with a line that:
o Contains the characters E N and D in that order and in various combinations of upper and lower cases.
o This line indicates the end of the data.
o This ending line is NOT part of the palindrome and should not be included in the test for a palindrome.
I need help with my client class
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
