This repository is used for teaching purposes at the University of Mons. It contains Java code for computing arithmetic expressions. The code uses design patterns and is accompanied with JavaDoc, unit tests and BDD scenarios. We have also paid particular attention to code quality.
Why is there no specific "mode" for boolean expressions (just as is the case for REAL / INTEGER / RATIONAL)?
Does it make sense to have the other numbers visible on the keyboard when you are in boolean mode? The answer is No, since an expression like true*5 is considered syntactically correct. The calculator does not allow to mix boolean values and integer values, even if the convention is that boolean values correspond to 0 and 1 respectively.
For writing a boolean expression, one needs to write the text "true" and "false" for boolean values, and there is nothing on the calculator keyboard that allows the user do do this. So strictly speaking, it is not possible to do so through the calculator keyboard.
It is not consistent that the result of a boolean expression is just 0 or 1, even when the input cannot be provided in terms of 0 andf 1. For example, and expression 0&1 is considered syntactically incorrect, while an expression true&false is syntactically correct but returns 0 instead of false!
Describe the bug