prj01-group02/src/VantageVue/WeatherStation.java
public void updateTemp() {
		if (tempArr[23] == 0 && tempArr[24] == 0) {
			tempArr[0] = (int) ((Math.random() * 130) - 20); //max temp = 110
			tempArr[24] = 1;
		}
		else {
			// Force temperature to stay in the range of -20 to 110
			do {
				tempArr[tempArr[24]] = tempArr[(tempArr[24] + 23) % 24] + (int) ((Math.random() * 15) - 7.5);
			} while (tempArr[tempArr[24]] < -20 || tempArr[tempArr[24]] > 110);
			tempArr[24] = (tempArr[24] + 1) % 24;
		}		
	}
/**
	 * updates the temperature array by adding another random temperature to the temp array. 
	 * 
	 * array is treated as a queue of size 24, the 25th element
	 * of the array keeps track of where the head of the queue is.
	 */
updates the temperature array by adding another random temperature to the temp array.

array is treated as a queue of size 24, the 25th element
of the array keeps track of where the head of the queue is.
updates the temperature array by adding another random temperature to the temp array . array is treated as a queue of size 24 the 25th element of the array keeps track of where the head of the queue is .
public void updateTemp() {
		if (tempArr[23] == 0 && tempArr[24] == 0) {
			tempArr[0] = (int) ((Math.random() * 130) - 20); 
			tempArr[24] = 1;
		}
		else {
			do {
				tempArr[tempArr[24]] = tempArr[(tempArr[24] + 23) % 24] + (int) ((Math.random() * 15) - 7.5);
			} while (tempArr[tempArr[24]] < -20 || tempArr[tempArr[24]] > 110);
			tempArr[24] = (tempArr[24] + 1) % 24;
		}		
	}
public void updateTemp ( ) { if ( tempArr [ 23 ] == 0 && tempArr [ 24 ] == 0 ) { tempArr [ 0 ] = ( int ) ( ( Math . random ( ) * 130 ) - 20 ) ; tempArr [ 24 ] = 1 ; } else { do { tempArr [ tempArr [ 24 ] ] = tempArr [ ( tempArr [ 24 ] + 23 ) % 24 ] + ( int ) ( ( Math . random ( ) * 15 ) - 7.5 ) ; } while ( tempArr [ tempArr [ 24 ] ] < - 20 || tempArr [ tempArr [ 24 ] ] > 110 ) ; tempArr [ 24 ] = ( tempArr [ 24 ] + 1 ) % 24 ; } }
updates the temperature array by adding another random temperature to the temp array.
updates the temperature array by adding another random temperature to the temp array .
//max temp = 110
 // Force temperature to stay in the range of -20 to 110
