List[K] = new Station(Location, Temp, Name);
In one method I enter in the values for Location and Name. In a later method I would like to loop through each Location and assign a unique Temp.
public void Post()
{
double Temp = 0;
int K;
for(K = 0; K < Count ; K++)
System.out.print(" " + List[K].GetLocation() + ": ");
System.out.println("Enter Temperature");
Temp = Input.nextDouble();
}
This simply dumps out all the locations and after that it prompts for a temperature and accepts it. But the temperature is not even assigned to the last value in the array.