Unit 5 Application - 2021 FRQ 1A
public int scoreGuess( String guess ) {
int val = 0;
int len = guess.length();
for( int i = 0; i <= secret.length()-len; i+=1){
String ck = secret.substring( i, i+len );
if( ck.equals(guess) ){
val++;
}
}
return val*len*len;
}
public void addMembers(
String[] names, int gradYear ){
for( String n : names ){
memberList.add(new MemberInfo( n, gradYear, true) );
}
}