question: public Assignment removePrimes ( ) { Assignment a = new Assignment ( ) ; for ( String var : map . keySet ( ) ) { if ( ! map . containsKey ( var + "'" ) ) { boolean hasPrime = ( var . charAt ( var . length ( ) - 1 ) == '\'' ) ; String newVar = ( hasPrime ) ? var . substring ( 0 , var . length ( ) - 1 ) : var ; a . addPair ( newVar , map . get ( var ) ) ; } } return a ; }
target:  Returns a new assignment with the primes removed.