Total Complexity | 1 |
Total Lines | 10 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | package yalep.code; |
||
9 | public class ExpressionToLogicalGatesConverter { |
||
10 | |||
11 | private String expression; |
||
12 | private Integer answer; |
||
13 | |||
14 | public ExpressionToLogicalGatesConverter(String expression) throws WrongExpressionFormatException { |
||
15 | LogicalExpressionValidityChecker.expressionIsValid(expression); |
||
16 | this.expression = expression.substring(0, expression.indexOf("=")); |
||
17 | this.expression = this.expression.replaceAll(" ",""); |
||
18 | answer = Integer.parseInt(expression.substring(expression.indexOf("=") + 1)); |
||
19 | } |
||
21 |