@@ -0,0 +1,775 @@
+package backend.command;%0A%0Aimport java.util.HashMap;%0A%0Aimport backend.StringPair;%0A%0Apublic class DoTimes extends Command %7B%0A%0A%09HashMap%3CString, Double%3E userVariables;%0A%0A%09public DoTimes(StringPair stringPair, HashMap%3CString, Double%3E userVariables, Command parent) %7B%0A%09%09super(stringPair, 2, parent);%0A%09%09this.userVariables = userVariables;%0A%09%7D%0A%0A%09public Double execute() %7B%0A%09%09int limit = getParam(0).getParamValue(1).intValue();%0A%09%09String countVar = getParam(0).getParam(0).getValue();%0A%0A%09%09return doTimes(limit, countVar);%0A%09%7D%0A%0A%09protected Double doTimes(int limit, String countVar) %7B%0A%09%09Double returnVal = 0.0;%0A%0A%09%09for(int i = 1; i %3C= limit; i++) %7B%0A%09%09%09// refactor duplicted code%0A%09%09%09userVariables.put(countVar, new Double(i));%0A%09%09%09returnVal = getParam(1).execute();%0A%09%09%7D%0A%0A%09%09return returnVal;%0A%09%7D%0A%0A%7D%0A

implement DoTimes again (pair programmed).