Skip to content

Commit

Permalink
add the exp to retry function
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhanglp committed Apr 15, 2024
1 parent ddc27d3 commit 4ef39de
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/seedu/duke/Storage.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ public static void processLine(String line) throws Exception {

for (int i = minimumLength + 1; i < words.length; i++) {
String[] term = words[i].split(",");
probSet.add(new Problem(term[0], Double.parseDouble(term[1]), null));
StringBuilder description = new StringBuilder(term[0]);
Calculator calculator = new Calculator();
Double answer = calculator.calculate(description);
String explanations = calculator.getExplanationsString();
probSet.add(new Problem(term[0], answer, explanations));
}


Expand Down

0 comments on commit 4ef39de

Please sign in to comment.