Question: JAVA/UNIX Make a program that keeps track of a collection of individual characters. Use an ArrayList collection as the ONLY datafield of your class. Call

JAVA/UNIX

Make a program that keeps track of a collection of individual characters. Use an ArrayList collection as the ONLY datafield of your class. Call the datafield data.

Add the following functionality:

a method called add that allows the addition of one new item (character) at the end of the collection

for every possible different approach of processing an ArrayList collection design methods called displayNameOfProcessingMethod that display the content of the collection beginning with the first item and ending with the last item. You should have quite a few display methods! Document them and include a write-up with the number of methods found. Make sure to replace NameOfProcessingMethod in the method name with the appropriate descriptive name for the approach used.

For every possible way that you can apply that does not require the use of additional storage, design methods called displayReverseNameOfProcessingMethod that display the content of the collection beginning with the last item and ending with the first item. Document how many of the methods you found. How many of the approaches that you used for display could be used for displayReverse?

For every possible way that you can apply that does not require the use of additional storage, design methods called testIfPalindromeNameOfProcessingMethod that returns true if the collection is a palindrome, false otherwise. Document how many methods you found.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!