Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

intil a -3, 5, 6, 8, 10, 12); c) for (int i - 0: i _ 0; i--2) { a[i] . a[i + 1);

ID: 3940239 • Letter: I

Question

intil a -3, 5, 6, 8, 10, 12); c) for (int i - 0: i _ 0; i--2) { a[i] . a[i + 1); } main method in this class). A class Collection has an array of integers and a count (integer) as The variable name for the array of integers is numArray Note: You need to distinguish the array size (capacity) and "count" that keeps track of numbers added to this array so far contain any of the following methods, points will be deducted.) method c reached its capacity. If both are satisfied, the number is added to the array at the the method returns true. If the number already exists in the array, the new number will

Explanation / Answer

Assignment7.java

Please enter the size of the array
2
Command Options
--------------------
a: add an integer in the array
b: remove an integer from the array
c: display the array
d: swap with the smallest
e: rotate the array
?: display the menu again
q: quit the menu
?
Command Options
--------------------
a: add an integer in the array
b: remove an integer from the array
c: display the array
d: swap with the smallest
e: rotate the array
?: display the menu again
q: quit the menu
a
Please enter the number to add in the array
2
2 successfully added
a
Please enter the number to add in the array
4
4 successfully added
a
Please enter the number to add in the array
1
1 successfully added
d
1 4 2
b
Please enter the number to remove from the array
3
3 is not in the array.
3 could not be removed
b
Please enter the number to remove from the array
2
2 successfully remove
c
{4,1}
c
{4,1}