Question: Problem 3 : For this problem you will have to review in detail ArrayList, your IOOP materiat that pertains to processing collections and specific features

Problem 3: For this problem you will have to review in detail ArrayList, your IOOP materiat that pertains to processing collections and specific features only available starting with Java 8.
Write 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 Document how many of the methods you found. How many of the approaches that you used for display could be used for displayReverse? positions 1,4,7,10,13,16,19, etc (if they exist). found.
Develop your own test suite to thoroughly test your solution and include the sample runs in your submission. Below is info from ReviewFrame:
Special consideration: ArrayList collection processing using the following approaches:
direct index access in basic loop (initial language design)
iterators (Iterator/Listlterator)(Java 2 and later)
enhanced (foreach) loop (Java 5 and later)
Java 8(and later)-specific:
forEach method + lambda expression
forEach method + method reference
When to use each approach and their limitations. Investigate in the context of efficiently ?****** implementing the following tasks on an ArrayList collection:
a. displaying the content of the collection starting with the first item and ending with the last item
b. displaying the content of the collection starting with the last item and ending with the first item
c. checking if the content of the collection is a palindrome
"** Important efficiency considerations: no additional storage for the collection, no repeated passes through the collection.
Make sure to test your Lab1P3Driver and place in Lab1P3Sampleruns.txt an extensive number of sample runs on various input data that you have designed.
 Problem 3: For this problem you will have to review in

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!