Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in java please Problem9: For this problem you will have to review in detail ArrayList, your IOOP material that pertains to processing collections and specific

image text in transcribedin java please

Problem9: For this problem you will have to review in detail ArrayList, your IOOP material 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 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 NameOfProcessing Method 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 display Reverse? For every possible way that you can apply that does not require the use of additional storage, design methods called testIfPalindromeNameOfProcessing Method that returns true if the collection is a palindrome, false otherwise. Document how many methods you found. Develop your own test suite to thoroughly test your solution and include the sample runs in your submission. Below is info from ReviewFrame: consider Special consideration: ArrayList collection processing using the following approaches: direct index access in basic loop (initial language design) iterators (Iterator/ListIterator) (Java 2 and later) enhanced (foreach) loop (Java 5 and later) Java 8 (and later) -specific: forEach method + lambda expression forEach method + method reference a When to use each approach and their limitations. Investigate in the context of efficiently implementing the following tasks on an ArrayList collection: 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 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. Problem9: For this problem you will have to review in detail ArrayList, your IOOP material 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 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 NameOfProcessing Method 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 display Reverse? For every possible way that you can apply that does not require the use of additional storage, design methods called testIfPalindromeNameOfProcessing Method that returns true if the collection is a palindrome, false otherwise. Document how many methods you found. Develop your own test suite to thoroughly test your solution and include the sample runs in your submission. Below is info from ReviewFrame: consider Special consideration: ArrayList collection processing using the following approaches: direct index access in basic loop (initial language design) iterators (Iterator/ListIterator) (Java 2 and later) enhanced (foreach) loop (Java 5 and later) Java 8 (and later) -specific: forEach method + lambda expression forEach method + method reference a When to use each approach and their limitations. Investigate in the context of efficiently implementing the following tasks on an ArrayList collection: 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 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions

Question

What is the purpose in recasting the income statement for analysis?

Answered: 1 week ago

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago