EasyCoverage.java

public class EasyCoverage {	
	public static final int MIN = 1;
	public static final int MAX = 2;
 
	public static int MinMax(int [] ar, int flag) {
		if(ar.length==0)
			return 0; 
		int m = ar[0];
		for(int i=0; i<ar.length; i++)
			if(flag==MIN) {
				if(m > ar[i])
					m = ar[i];
			} else {
				if(m < ar[i])
					m = ar[i];				
			}
		return m;
	}
}
software_testing/lect06_coverage.txt · Last modified: 2008/12/19 00:19 (external edit)
 
 
©2008 Another cool website by 80KV