Homework #4 - ARRAYS
Homework #4 - ARRAYS
2. Create a class named TestArray to call mehods from class Array. Class TestArray has
the following fields:
- Array arr = new Array();
Implement the following methods which will invoke methods of Array class for
processing:
- Input n integer numbers of an Array object (arr)
- Output an Array object
- Caculate the sum of array elements which is divisible by 2 and 5.
- Caculate the last minimum sum of two consecutive elements
- Caculate the average of odd array elements
- Count the number of prime array elements
- Check if the given array is a symmetric array or not
- Check if the given array is increasing
- Delete negative array elements
- Sort the array to make it increasing
- Given an increasing array. Insert into that array x value to make it
remain increasing
- Reverse the array elements
- Find the longest increasing subsequence of an integer sequence
- Find the longest subsequence which is the longest arithmetic
progression of an integer sequence
- Find the longest sawtooth sequence in an integer sequence
- Sort the given array to make a new one that contains even and divisible
by 3 elements at the beginning, odd and divisible by 3 elements at the
end and the remains in the middle.