Implementing methods: search, load and print
<p>Please see my comments in the code to better explain things.  Basically having issues with the methods below.  I can get the load method to run but I am unsure whether the numbers entered by the user are actually being stored in the array.  </p>

<p>In addition, the search method has been throwing things off and i think its going in a loop.</p>

<p>See below for more.  Thank you in advance.</p>

<pre><code>import java.util.Scanner;
public class MyContainer {
private int[] values;
private int size;
public MyContainer(){
values=new int[50];
size=0;}

//Load Method - Display a message to the user 
//and get positive intergers from user
public void load()
{
int input;
Scanner in = new Scanner(System.in);
System.out.println("Enter a series of positive integers (Negative to Terminate): ");

input=in.nextInt();
while (input &gt;=0) {
  values[size]=input;
  size++;
  input=in.nextInt();
}

}//End Load

//Compute Average from the above entered numbers
public double computeAverage() {
double avg= 0.0;
int count = 0;
while(values[size] &gt;=0)
{avg = avg + values[size];
count++;
}
size = size + 1;
avg = avg / size;
return avg;

}

//Get user input to search for a number in the array
public boolean search(int myInt){

while(values[size] &gt;=0) {
if (values[size] == myInt){
  return true;}
else{
  size++;}
}
return false;
}

 //print the position of the number
  public void print(){
   for(int i=0;i&gt;=size;i++) {
   System.out.println("The number at position " + i + " is " + values[i]);
 }
 }
}
</code></pre>

<p>That is what I have so far.  I also have created a tester class for the above container.</p>

<pre><code>   class Tester {
   public static void main(String[] args) {
   MyContainer in = new MyContainer();
   in.load();
   in.computeAverage();
   in.search(); //i know for a fact this is wrong just stuck        
   in.print();    
 }
}
</code></pre>

<p>Any advise/help would be greatly appreciated.  My professor is terrible at teaching and the book only partially explains things.</p>
