MezData-LogoCreative Commons License Lösung 2006-Wi-SE-A2

Java-Quelltext

public class Kabel{
  public static boolean teste(){
    int test[]={4,32,1,8,16,2,64,128};
    return checkKabel22(test);
  }
			    
  public static boolean checkKabel22(int[] mFeld){
    int rFeld[]={4,32,1,8,16,2,64,128};
    int i=0;
    while (i<8 && rFeld[i]==mFeld[i])
      i++;
    return i==8;  
  }
		  
  public static boolean checkKabel23(int[] mFeld){
    int rFeld[]={1,2,4,8,16,32,64,128};
    int i=0;
    while (i<8 && rFeld[i]==mFeld[i])
      i++;
    return i==8;  
  }
}

Struktogramme

© Oliver Mezger 20.11.2008 MezData.de Den Kontakt herstellen...