ICSI201 University at Albany Public Class Patient Project This is introduction to computer science. Just use the basic language to solve those problems Lis

ICSI201 University at Albany Public Class Patient Project This is introduction to computer science. Just use the basic language to solve those problems Lists
3. [10 points] Complete the insertNumber and removeNumber methods below. The insertNumber method
inserts a number at a given position in a list of numbers. The removeNumber method removes the number
at the given position in the list.
public class NumberList {
private final int SIZE = 10;
private int numberOfItems;
private int[] numberList;
public NumberList() {
numberList = new int[SIZE];
numberOfItems 0;
}
//If there is still room in the numberList array and the position is not
the
1/greater than or equal to 0 and less than or equal to the number of
//items in the numberList, insert the number at the given position
1/in the numberList being sure to shift the other numbers correctly
1/and increment the number of items.
//Else, do nothing.
public void insertNumber(int number, int position) {
(to) 203
anto
Cat:
Ciga
}
//If the position is greater than or equal to 0 and less than the number
//of items in the numberList, remove the number in the given position
//by correctly shifting the other numbers and decrementing the number
//of items.
//Else, do nothing.
public void removeNumber(int position) {
(H+ t = titolo
10.de
(+) nado
}
37 i no 9002
Score on this page
6
Loops
4. (10 points) Give the output for each code fragment below:
for (int i = 0; i < 5; i++) System.out.print(1 + " "); int sum = 0; int i = 5; while (i > 0) {
sum sum + i;
}
System.out.println(sum);
TO
toge
for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) System.out.print("x"); System.out.println(); } for (int i = 0; i < 5; i++) { for (int j = 0; j Purchase answer to see full attachment

Don't use plagiarized sources. Get Your Custom Essay on
ICSI201 University at Albany Public Class Patient Project This is introduction to computer science. Just use the basic language to solve those problems Lis
For $10/Page 0nly
Order Essay
Calculator

Calculate the price of your paper

Total price:$26

Need a better grade?
We've got you covered.

Order your paper