Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a JAVA class called IntegerArrayHelper that has the following attributes: IntegerArrayHelper myArray[] - Integer size - Integer IntegerArrayHelper () IntegerArrayHelper (int[]) addItem(Integer) - Boolean

Create a JAVA class called IntegerArrayHelper that has the following attributes:

IntegerArrayHelper
myArray[] - Integer
size - Integer
IntegerArrayHelper ()
IntegerArrayHelper (int[])
addItem(Integer) - Boolean
removeItem(Integer) - Boolean
searchItem(Integer) - Boolean
sortArray() - Boolean
getSize() - Integer
getCapacity() - Integer
toString() - String

Note:

addItem(Integer) will add an item to the list if it will fit. It will add the item to the first available spot

removeItem(Integer) will remove the given item and move all items that appear after the removed one in the list up one spot. Leaving all null values at the end of the list.

searchItem(Integer) will return true if that given string exists within the list and false if it does not.

sortArray() will use a selection sort to sort the list and return true if the list is sorted.

getSize() will return the total number of items that are currently in the array.

getCapacity() returns the total number of items that the array could possibly hold.

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

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions