Code example for Random

Methods: nextDouble, nextInt

0
			pressureServed = false;
		} 
	} 
 
	private void calculateMAFValues(float realMaf) {
		temperature = 26.0 + random.nextDouble()*4.0;
		pressure = 90.0 + random.nextInt(70);
		 
		/* 
		 * use static values for our simulated car 
		 */ 
		double displacement = 1.15;
		int volumeEfficiencey = 85;
		 
		double imap = (12000 * realMaf) / (volumeEfficiencey * displacement);
		 
		rpm = (int) Math.floor(((temperature + 273.15d) * imap) / pressure);
	} 
}